ANTLR Tool Command-Line Options

If you invoke the ANTLR tool without command-line arguments, you’ll get a help message.

​ ​$ ​​antlr4​
​ ANTLR Parser Generator Version 4.0
​  -o ___ specify output directory where all output is generated
​  -lib ___ specify location of grammars, tokens files
​  -atn generate rule augmented transition network diagrams
​  -encoding ___ specify grammar file encoding; e.g., euc-jp
​  -message-format ___ specify output style for messages in antlr, gnu, vs2005
​  -listener generate parse tree listener (default)
​  -no-listener don't generate parse tree listener
​  -visitor generate parse tree visitor
​  -no-visitor don't generate parse tree visitor (default)
​  -package ___ specify ...

Get The Definitive ANTLR 4 Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.