Skip to content

Instantly share code, notes, and snippets.

@subchen
Created May 22, 2014 10:28
Show Gist options
  • Save subchen/464b05ee611bce031984 to your computer and use it in GitHub Desktop.
Save subchen/464b05ee611bce031984 to your computer and use it in GitHub Desktop.
ANTLR Tool Command Line Options

from: https://theantlrguy.atlassian.net/wiki/display/ANTLR4/ANTLR+Tool+Command+Line+Options

$ antlr4
ANTLR Parser Generator Version 4.0b3
-o <arg>                specify output directory where all output is generated
-lib <arg>              specify location of grammars, tokens files
-atn                    generate rule augmented transition network diagrams
-encoding <arg>         specify grammar file encoding; e.g., euc-jp
-message-format <arg>   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 <arg>          specify a package/namespace for the generated code
-depend                 generate file dependencies
-D<option>=value        set/override a grammar-level option
-Werror                 treat warnings as errors
-Xsave-lexer            save temp lexer file created for combined grammars
-XdbgST                 launch StringTemplate visualizer on generated code
-Xforce-atn             use the ATN simulator for all predictions
-Xlog                   dump lots of logging info to antlr-timestamp.log
-XdbgSTWait             wait for STViz to close before continuing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment