-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic assignment of indices #22
Comments
Let me explain, it works like this:
Is the equivalent of:
I do not know the reason for this, I just described what it does. |
Explicit specification of a port index is part of the PEG grammar (https://github.com/noflo/fbp/blob/master/grammar/fbp.peg). I think a required order of declaration is a bad idea. At least in the Go version of FBP DSL (https://github.com/oleksandr/fbp) the indices should be specified explicitly and the order does not matter. |
@oleksandr I think the automatic assignment unless specified is an artifact of original NoFlo handling of ArrayPorts, and shouldn't be part of the spec. Of course, the problem is that the FBP parser doesn't really know anything about the components, and so can't throw a parse error on non-indexed connection with ArrayPort. But well-behaved FBP runtimes probably should. |
Alex, I agree absolutely, this is a bad idea! I can sort of see the logic for Alfredo's example, but consider the inverse: Bar OUT -> IN Zaz a) or b) If b) is what you want, there is no way to force it, except by specifying -> IN[0] Zaz explicitly, which is counter-intuitive, as most of the time IN Zaz will not On Sat, Sep 20, 2014 at 4:52 PM, Oleksandr Lobunets <
|
In https://github.com/flowbased/flowbased.org/wiki/FBP-DSL , it says: "The javascript implementation of the parser assumes order of declaration as the index automatically, but this is not a characteristic of the DSL."
I assume this means that, if the parser knows that the port is an array port, and if the the port is somehow marked as an array, that the indices will be assigned automatically, unless explicitly overridden. How is the port marked as an array? I am guessing that you use empty square brackets, but, whatever you use, it should be spelled out explicitly.
Thanks in advance,
The text was updated successfully, but these errors were encountered: