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 range to {} operator #11

Open
waterstopper opened this issue Jun 13, 2023 · 1 comment
Open

Add range to {} operator #11

waterstopper opened this issue Jun 13, 2023 · 1 comment
Labels
enhancement New feature or request interpreter related to Kotlin interpreter

Comments

@waterstopper
Copy link
Owner

waterstopper commented Jun 13, 2023

Curently {} operator specifies exactly how much repetitions of token should be:

root = "A"{5} !. # AAAAA is valid

Make it so that it greedily chooses max amount of repetitions from range, if specified:

root = "A"{3-5} !. # AAA, AAAA and AAAAA are valid
@waterstopper waterstopper added enhancement New feature or request interpreter related to Kotlin interpreter labels Jun 13, 2023
@waterstopper
Copy link
Owner Author

need some real use cases, seems it is not useful in real grammars

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request interpreter related to Kotlin interpreter
Projects
None yet
Development

No branches or pull requests

1 participant