-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Add fixed grammars #4894
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
base: dev
Are you sure you want to change the base?
Add fixed grammars #4894
Conversation
|
Add non-overlapping ANTLR grammar examples for runtime tests This commit introduces a set of nine non-obvious, non-overlapping grammars Included grammars:
All grammars are self-contained and compile successfully with ANTLR 4. |
…#4171) Signed-off-by: FireWolf <[email protected]> Signed-off-by: sumittlearnbay <[email protected]>
Signed-off-by: sumittlearnbay <[email protected]>
Signed-off-by: sumittlearnbay <[email protected]>
Signed-off-by: sumittlearnbay <[email protected]>
4148b07 to
b340cb9
Compare
|
successful check |
|
For pedagogical purposes, your grammars should use EOF-terminated start rules. Since Antlr 4.7, the behavior of Antlr parsers has changed in how they parse at the point of an error: the parser backs up the input pointer to the last valid parse and reports success. For example, with Arithmetic.g4, the input Also, I don't think your BooleanExpr grammar is a good example. Typically, the |
Signed-off-by: sumittlearnbay <[email protected]>
|
Add EOF-terminated fixed grammars following ANTLR 4.7+ and Boolean precedence standards
Signed-off-by: Sumit Pawar [email protected] |
1 similar comment
|
Add EOF-terminated fixed grammars following ANTLR 4.7+ and Boolean precedence standards
Signed-off-by: Sumit Pawar [email protected] |
No description provided.