Rules for ANTLR 3.

antlr

Runs ANTLR 3 on a set of grammars.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
depsThe dependencies to use. Defaults to the most recent ANTLR 3 release, but if you need to use a different version, you can specify the dependencies here.List of labelsoptional["@antlr3_runtimes//:tool"]
srcsThe grammar files to process.List of labelsrequired
XconversiontimeoutSet NFA conversion timeout for each decision.Integeroptional0
XdbgconversionDump lots of info during NFA conversion.BooleanoptionalFalse
XdbgstPut tags at start/stop of all templates in output.BooleanoptionalFalse
XdfaPrint DFA as text.BooleanoptionalFalse
XdfaverboseGenerate DFA states in DOT with NFA configs.BooleanoptionalFalse
XgrtreePrint the grammar AST.BooleanoptionalFalse
XmMax number of rule invocations during conversion.Integeroptional0
XmaxdfaedgesMax "comfortable" number of edges for single DFA state.Integeroptional0
XmaxinlinedfastatesMax DFA states before table used rather than inlining.Integeroptional0
XminswitchaltsDon't generate switch() statements for dfas smaller than given number.Integeroptional0
XmultithreadedRun the analysis in 2 threads.BooleanoptionalFalse
XnfastatesFor nondeterminisms, list NFA states for each path.BooleanoptionalFalse
XnocollapseCollapse incident edges into DFA states.BooleanoptionalFalse
XnomergestopstatesMax DFA states before table used rather than inlining.BooleanoptionalFalse
XnopruneDo not test EBNF block exit branches.BooleanoptionalFalse
XsaveLexerFor nondeterminisms, list NFA states for each path.BooleanoptionalFalse
XwatchconversionDon't delete temporary lexers generated from combined grammars.BooleanoptionalFalse
debugGenerate a parser that emits debugging events.BooleanoptionalFalse
dependGenerate file dependencies; don't actually run antlr.BooleanoptionalFalse
dfaGenerate a DFA for each decision point.BooleanoptionalFalse
dumpPrint out the grammar without actions.BooleanoptionalFalse
importsThe grammar and .tokens files to import. Must be all in the same directory.List of labelsoptional[]
languageThe code generation target language. Either C, Cpp, CSharp2, CSharp3, JavaScript, Java, ObjC, Python, Python3 or Ruby (case-sensitive).Stringoptional""
message_formatSpecify output style for messages.Stringoptional""
nfaGenerate an NFA for each rule.BooleanoptionalFalse
packageThe package/namespace for the generated code.Stringoptional""
profileGenerate a parser that computes profiling information.BooleanoptionalFalse
reportPrint out a report about the grammar(s) processed.BooleanoptionalFalse
traceGenerate a parser with trace output. If the default output is not enough, you can override the traceIn and traceOut methods.BooleanoptionalFalse