antlr(name, Xconversiontimeout, Xdbgconversion, Xdbgst, Xdfa, Xdfaverbose, Xgrtree, Xm, Xmaxdfaedges, Xmaxinlinedfastates, Xminswitchalts, Xmultithreaded, Xnfastates, Xnocollapse, Xnomergestopstates, Xnoprune, XsaveLexer, Xwatchconversion, debug, depend, deps, dfa, dump, imports, language, message_format, nfa, package, profile, report, srcs, trace)
Runs ANTLR 3 on a set of grammars.
ATTRIBUTES
Name | Description | Type | Mandatory | Default |
---|---|---|---|---|
name | A unique name for this target. | Name | required | |
Xconversiontimeout | Set NFA conversion timeout for each decision. | Integer | optional | 0 |
Xdbgconversion | Dump lots of info during NFA conversion. | Boolean | optional | False |
Xdbgst | Put tags at start/stop of all templates in output. | Boolean | optional | False |
Xdfa | Print DFA as text. | Boolean | optional | False |
Xdfaverbose | Generate DFA states in DOT with NFA configs. | Boolean | optional | False |
Xgrtree | Print the grammar AST. | Boolean | optional | False |
Xm | Max number of rule invocations during conversion. | Integer | optional | 0 |
Xmaxdfaedges | Max "comfortable" number of edges for single DFA state. | Integer | optional | 0 |
Xmaxinlinedfastates | Max DFA states before table used rather than inlining. | Integer | optional | 0 |
Xminswitchalts | Don't generate switch() statements for dfas smaller than given number. | Integer | optional | 0 |
Xmultithreaded | Run the analysis in 2 threads. | Boolean | optional | False |
Xnfastates | For nondeterminisms, list NFA states for each path. | Boolean | optional | False |
Xnocollapse | Collapse incident edges into DFA states. | Boolean | optional | False |
Xnomergestopstates | Max DFA states before table used rather than inlining. | Boolean | optional | False |
Xnoprune | Do not test EBNF block exit branches. | Boolean | optional | False |
XsaveLexer | For nondeterminisms, list NFA states for each path. | Boolean | optional | False |
Xwatchconversion | Don't delete temporary lexers generated from combined grammars. | Boolean | optional | False |
debug | Generate a parser that emits debugging events. | Boolean | optional | False |
depend | Generate file dependencies; don't actually run antlr. | Boolean | optional | False |
deps | The 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 labels | optional | [Label("@antlr3_runtime//jar:jar"), Label("@antlr3_tool//jar:jar"), Label("@stringtemplate4//jar:jar")] |
dfa | Generate a DFA for each decision point. | Boolean | optional | False |
dump | Print out the grammar without actions. | Boolean | optional | False |
imports | The grammar and .tokens files to import. Must be all in the same directory. | List of labels | optional | [] |
language | The code generation target language. Either C, Cpp, CSharp2, CSharp3, JavaScript, Java, ObjC, Python, Python3 or Ruby (case-sensitive). | String | optional | "" |
message_format | Specify output style for messages. | String | optional | "" |
nfa | Generate an NFA for each rule. | Boolean | optional | False |
package | The package/namespace for the generated code. | String | optional | "" |
profile | Generate a parser that computes profiling information. | Boolean | optional | False |
report | Print out a report about the grammar(s) processed. | Boolean | optional | False |
srcs | The grammar files to process. | List of labels | required | |
trace | Generate a parser with trace output. If the default output is not enough, you can override the traceIn and traceOut methods. | Boolean | optional | False |
imports(folder)
Returns the grammar and token files found below the given lib directory.
PARAMETERS
Name | Description | Default Value |
---|---|---|
folder | - |
none |