Skip to content
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

Add to grammar syntax for specifying flow rates on block inputs and outputs. #32

Open
tmcphillips opened this issue Aug 22, 2017 · 2 comments

Comments

@tmcphillips
Copy link
Member

No description provided.

@tmcphillips
Copy link
Member Author

One option would to allow optional cardinality qualifiers on port names, optionally within square brackets. For example an input that receives zero or one items per execution of a block could equivalently be given as:

@in optional_input?
@in optional_input[?]
@in optional_input[0-1]

An output that produces one or more outputs could be written as:

@out one_or_more+
@out one_or_more[+]
@out one_or_more[1-n]

And an input that takes zero or more items per execution:

@in zero_or_more*
@in zero_or_more[*]
@in zero_or_more[0-n]

An output that produces exactly 2 items per execution:

@out exactly_two[2]

And an input takes three to five items:

@in three_to_five[3-5]

@tmcphillips
Copy link
Member Author

Paired curly braces could be supported as well in cases where square brackets imply array indexing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant