January 2013
Intermediate to advanced
328 pages
8h 5m
English
You can specify a number of options at the grammar and rule element levels. (There are currently no rule options.) These change how ANTLR generates code from your grammar. The general syntax is as follows:
| | options { name1=value1; ... nameN=valueN; } // ANTLR not target language syntax |
where a value can be an identifier, a qualified identifier (for example, a.b.c), a string, a multiline string in curly braces {...}, and an integer.
All grammars can use the following options. In combined grammars, all options except language pertain only to the generated parser. Options may be set either within the grammar file using the options syntax (described earlier) or when invoking ANTLR on the command line, ...
Read now
Unlock full access