antlr2.md

January 2, 2020 ยท View on GitHub

antlr

antlr(name, debug, deps, diagnostic, docbook, html, imports, language, package, srcs, trace,
      traceLexer, traceParser, traceTreeParser)

Runs ANTLR 2 on a set of grammars.

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
debugLaunch the ParseView debugger upon parser invocation. Unless you have downloaded and unzipped the debugger over the top of the standard ANTLR distribution, the code emanating from ANTLR with this option will not compile.BooleanoptionalFalse
depsThe dependencies to use. Defaults to the final ANTLR 2 release, but if you need to use a different version, you can specify the dependencies here.List of labelsoptional[Label("@antlr2//jar:jar")]
diagnosticGenerate a text file from your grammar with a lot of debugging info.BooleanoptionalFalse
docbookGenerate a docbook SGML file from your grammar without actions and so on. It only works for parsers, not lexers or tree parsers.BooleanoptionalFalse
htmlGenerate a HTML file from your grammar without actions and so on. It only works for parsers, not lexers or tree parsers.BooleanoptionalFalse
importsThe grammar file to import.List of labelsoptional[]
languageThe code generation target language. Either Cpp, CSharp, Java or Python (case-sensitive).Stringoptional""
packageThe package/namespace for the generated code.Stringoptional""
srcsThe grammar files to process.List of labelsoptional[]
traceHave all rules call traceIn/traceOut.BooleanoptionalFalse
traceLexerHave lexer rules call traceIn/traceOut.BooleanoptionalFalse
traceParserHave parser rules call traceIn/traceOut.BooleanoptionalFalse
traceTreeParserHave tree walker rules call traceIn/traceOut.BooleanoptionalFalse