Comments (5)
The example grammar contains an LR rule (expr
) containing a left-edge rule reference to a different LR rule (strongExpr
). However, since strongExpr
does not contain a left-edge rule reference back to expr
, the grammar after LR translation does not contain any left recursion so it could be correctly generated. Whether or not ANTLR will support LR rules invoking other LR rules is left to be determined.
The tool should either generate working code or produce an error message and fail to generate code.
from antlr4.
is it possible to fix this issue in the near future? It is a real blocker for my current project (yes, I know, I should not depend on an ea version ;).
@sharwell: Ter stated that only mutually left recursive rules are forbidden. The example is not mutually left recursive, so it should compile fine.
from antlr4.
ha! I just figured this out!!! don't use rule as a rule name because it becomes RuleContext which is the predefined context object.
from antlr4.
great, the sempred is gone. I guess you should disallow rules with that name. However, the generated parser still does not work, see the new issue: #45
from antlr4.
I created #77 to address the naming problems.
from antlr4.
Related Issues (20)
- Unable to customize error messages on top of error messages generated by ANTLR4 Parser HOT 1
- [go] performance downgrade a lot after upgrade antlr from 4.9 to 4.13.1 HOT 8
- [C++] Building grammar with rule named "match" causes errors
- JavaScript runtime fails to parse input that can be parsed by `grun` with same grammar HOT 1
- Regex
- Go target: missing constructor call to the superclass of the generated parser or lexer HOT 2
- limits like DIGIT {min,max} in patterns HOT 1
- antlr4 lacks automatic module name, which is inconsistent to antlr4-runtime
- ANTLR 4.2 and later fail to report error with mislocated 'assoc'
- ANLTR4 Pascal target for parsing Pascal Object Notation HOT 8
- TSQL select query not parsed when it inside the quotes HOT 1
- [go target] Build errors with PartiQL parser HOT 8
- setErrorHandler method is missing from Parser class in TypeScript target
- _sharedContextCache is not thread safe HOT 1
- Unexcept parse
- Use the new version antlr4-python3-runtime 4.13.1 import latex2sympy2 error
- Use the new version antlr4-python3-runtime 4.13.1 import latex2sympy2 error HOT 1
- Lexing Issue in ANTLR4 Grammar for Fortran 2018: Token Misclassification HOT 1
- Windows CPP Symbol Conflicts (EMPTY, WIN16, WIN32, WIN64)
- Is this project out of date?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from antlr4.