Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 4.38 KB

antlr4.md

File metadata and controls

60 lines (41 loc) · 4.38 KB

antlr

antlr(name, atn, depend, deps, encoding, error, force_atn, imports, language, layout, listener, log,
      long_messages, message_format, no_listener, no_visitor, options, package, srcs, visitor)

Runs ANTLR 4 on a set of grammars.

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
atn Generate rule augmented transition network diagrams. Boolean optional False
depend Generate a list of file dependencies instead of parser and/or lexer. Boolean optional False
deps The dependencies to use. Defaults to the official ANTLR 4 release, but if you need to use a different version, you can specify the dependencies here. List of labels optional [Label("@antlr4_tool//jar:jar"), Label("@antlr4_runtime//jar:jar"), Label("@antlr3_runtime//jar:jar"), Label("@stringtemplate4//jar:jar"), Label("@javax_json//jar:jar")]
encoding The grammar file encoding, e.g. euc-jp. String optional "UTF-8"
error Treat warnings as errors. Boolean optional False
force_atn Use the ATN simulator for all predictions. 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 Cpp, CSharp, Go, JavaScript, Java, Python2, Python3 or Swift (case-sensitive). String optional ""
layout - String optional ""
listener Generate parse tree listener. Boolean optional True
log Dump lots of logging info to antlr-timestamp.log. Boolean optional False
long_messages Show exception details when available for errors and warnings. Boolean optional False
message_format The output style for messages. Either antlr, gnu or vs2005. String optional "antlr"
no_listener Do not generate parse tree listener. Boolean optional False
no_visitor Do not generate parse tree visitor. Boolean optional True
options Set/override grammar-level options. Dictionary: String -> String optional {}
package The package/namespace for the generated code. String optional ""
srcs The grammar files to process. List of labels required
visitor Generate parse tree visitor. Boolean optional False

imports

imports(folder)

Returns the grammar and token files found below the given lib directory.

PARAMETERS

Name Description Default Value
folder

-

none