Comments (10)
Hello Larry,
would it be possible for you to share your g4 file so that I can reproduce and fix the bug?
Thank you very much and kind regards,
Julian
from inmemantlr.
from inmemantlr.
Hello Larry,
sorry, I could not find an attached file. Could you sent it via E-mail to me ([email protected]).
Thanks a lot for your help and kind regards,
Julian
from inmemantlr.
from inmemantlr.
Hello Larry,
thanks for the link. I've just checked the grammar with inmemantlr-v1.3.1 and with vanilla ANTLR v4.6. In both cases, I do get the same error, though.
cd /tmp
sudo curl -O http://www.antlr.org/download/antlr-4.6-complete.jar
export CLASSPATH=".:/tmp/antlr-4.6-complete.jar:$CLASSPATH"
alias antlr4='java -jar /tmp/antlr-4.6-complete.jar'
antlr4 GenScalaFacadesFromTypescript.g4
javac -classpath '/tmp/antlr-4.6-complete.jar:.' *.java
The response is:
GenScalaFacadesFromTypescriptLexer.java:156: error: cannot find symbol
return !strictMode;
^
symbol: variable strictMode
location: class GenScalaFacadesFromTypescriptLexer
1 error
After removing the {!strictMode}
reference in the g4 file, it worked for both inmemantlr and vanilla ANTLR.
I was wondering if you could provide me some information on how you've got the grammar working with vanilla ANTLR.
Thank you very much and kind regards,
Julian
from inmemantlr.
from inmemantlr.
from inmemantlr.
Ah I see. I think the ECMA script grammar from the grammar-v4 package might be a useful resource as well since they also use the strict member of the Lexer class.
The grammars-v4 cases are handled by the JUnit class TestExternalGrammars (the ECMA script test case can be found in the function testEcmaScript
).
Kind regards,
Julian
from inmemantlr.
from inmemantlr.
Hi Larry,
ok, thanks a lot for your feedback. In case there are other problems, please do not hesitate to contact me and/or open another issue.
Best wishes and kind regards,
Julian
from inmemantlr.
Related Issues (20)
- Error when using with spring boot and antlr4 HOT 7
- Java 9 compatibility
- Compiler Options HOT 1
- Serialize grammar to project classpath HOT 1
- Add extra flag to DefaultTreeListener for terminal nodes HOT 1
- Generate and compile in memory only the lexer HOT 5
- Replace eclipse compiler with standard JavaCompiler API
- Better tree manipulation support
- JSON/XML serialization in topological order HOT 1
- Improve output for dot format
- Cleanup API
- Can't load any v4 grammars HOT 10
- Question regarding parse tree generation HOT 12
- I can not run all test case HOT 2
- How to get all the nodes after filtering HOT 12
- How to use "Utility Files" HOT 1
- Line and Column Error in ParseTreeNode HOT 5
- Can't parse with DE-serialized parser HOT 1
- class Version HOT 2
- InmemantlrTool uses only terminal-defined package names, ignoring action-defined ones
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 inmemantlr.