O'Reilly logo

The Definitive ANTLR 4 Reference, 2nd Edition by Terence Parr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 a package/namespace for the generated code
 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required