-
Notifications
You must be signed in to change notification settings - Fork 3
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
Confusing error message in case of a syntax error #19
Comments
The order of the rules don't matter. The error is very misleading though, the problem is that the directive is called |
@badicsalex Post-processing on directives and rejecting unrecognized directives and saying "Unknown directive x" would be better. |
Also, the error message when misusing |
Notes to myself (or anyone who's willing to fix this): This error is caused by the structure of the peginator grammar, namely the first rule:
Parsing the rule list stops at the first weird directive, but is successful otherwise. Then comes the EOI check, and that throws an error. Unfortunately the EOI check happens at the same place as the first parsing failure (the position of the "@", since the directive check strings contain the @ already). If there are multiple furthest errors, all of them should be stored. |
I'm very confused. The peginator-cli binary is giving me this error:
But my grammar certainly isn't done on this line (the number of lines are primarily because I generated the unicode character classes that I needed to match.... Probably not the "best" way I could do it, but it (should) work.) Anyway, it's getting stuck on this:
At a glance I can't see any kind of syntax error, so I'm quite confused. Does order of the rules matter? (I hope not...)
The text was updated successfully, but these errors were encountered: