-
Notifications
You must be signed in to change notification settings - Fork 42
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
How are delegates selected? #35
Comments
The tokens you declare with delegation are matched in the same order as declared. So if the tokenizing is ambiguous (which is often the case) then the tokens declared earlier are prioritized. Note also this section in the README:
|
Im finding that the order I declare my delegates in a parser grammar affects whether or not it parses. I have a grammar like the following:
thats meant to parse
into a list of Commands. By just switching the order of str, queryType, and word the parse will fail / pass on different test cases with errors like
Could not parse input: UnparsedRemainder(startsWith=word@2 for "findFoo" at 39 (2:1))
The text was updated successfully, but these errors were encountered: