Both the runtime module and the code generation templates should now be feature complete and in sync with the Java target, except for the features listed below.
This page was modeled on the Python target's page: thanks Benjamin Niemann.
For a grammar
T.g ANTLR3 will then create the files
TParser.js which contain the classes
TParser (or just one of those, if you have a pure lexer/parser). For tree parsers, ANTLR3 creates
T.js containing the class
Using the Generated Classes
To use a grammar
If you want to access the tokens in your code, they are stored as static properties of the lexer and parser:
Using Tree Parsers
T.g (parser and lexer) and
TWalker.g (the tree parser):
- -debug option is not available
- haven't integrated with ANTLRWorks yet
- StringTemplate output ("output=template;") not available