- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Antlr4-maven-plugin 似乎不是 Antlr4 网站上的文档。
最佳答案
这可能会让你一无所获,就像我一样。尝试这个:
mvn org.antlr:antlr4-maven-plugin:help -Ddetail=true
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- antlr4-maven-plugin:4.0:help (default-cli) @ standalone-pom ---
[INFO] ANTLR 4 Maven plugin 4.0
Maven plugin for ANTLR 4 grammars
This plugin has 2 goals:
antlr4:antlr4
Parses ANTLR 4 grammar files *.g4 and transforms them into Java source files.
Available parameters:
arguments
A list of additional command line arguments to pass to the ANTLR tool.
atn
If set to true then the ANTLR tool will generate a description of the ATN
for each rule in Dot format.
encoding
specify grammar file encoding; e.g., euc-jp
excludes
A set of Ant-like exclusion patterns used to prevent certain files from
being processed. By default, this set is empty such that no files are
excluded.
forceATN
Use the ATN simulator for all predictions.
includes
Provides an explicit list of all the grammars that should be included in
the generate phase of the plugin. Note that the plugin is smart enough to
realize that imported grammars should be included but not acted upon
directly by the ANTLR Tool. A set of Ant-like inclusion patterns used to
select files from the source directory for processing. By default, the
pattern **/*.g4 is used to select grammar files.
libDirectory
Specify location of imported grammars and tokens files.
listener
Generate parse tree listener interface and base class.
options
A list of grammar options to explicitly specify to the tool. These options
are passed to the tool using the -D<option>=<value> syntax.
outputDirectory
Specify output directory where the Java files are generated.
sourceDirectory
The directory where the ANTLR grammar files (*.g4) are located.
treatWarningsAsErrors
Treat warnings as errors.
visitor
Generate parse tree visitor interface and base class.
antlr4:help
Display help information on antlr4-maven-plugin.
Call mvn antlr4:help -Ddetail=true -Dgoal=<goal-name> to display parameter
details.
Available parameters:
detail
If true, display all settable properties for each goal.
goal
The name of the goal for which to show help. If unspecified, all goals
will be displayed.
indentSize
The number of spaces per indentation level, should be positive.
lineLength
The maximum length of a display line, should be positive.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.635s
[INFO] Finished at: Wed Jul 03 14:52:12 EDT 2013
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
关于antlr4 - 我如何获得有关 antlr4-maven-plugin 的帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15324837/
让我们考虑以下 ANTLR4 语法(最小示例): grammar Foo; expr : a? b? c? ; 我如何指定 a、b 或 c 中的至少一个 必须出现在表达式? 基本上我正在寻
我为字符串变量声明写了下面的语法。字符串的定义类似于单引号之间的任何内容,但必须有一种方法可以通过使用 $ 字母转义将单引号添加到字符串值。 grammar test; options {
我最近创建了一个 ANTLR3 解析器规则 options : foo bar; 它没有编译,我花了一些时间才发现 options是一个保留字(AntlrWorks 指出了错误,但没有指出原因)。 A
我正在从“The Definitive Antlr reference”一书中学习 Antlr。我还处于起步阶段。我喜欢动手做东西,所以我认为做一个好的示例项目会是一个很好的学习经验。 我正在寻找一个
我们有一个为 antlr V2 编写的语法,我想迁移到 antlr v4。有迁移指南吗?我还想知道对现有 V2 语法的修改,以便我们更好地利用 v4 功能。 最佳答案 我通过编写一个新的 Antlr
介绍 查看文档,ANTLR 2 曾经有一个叫做 predicated lexing 的东西。 ,有这样的例子(受 Pascal 启发): RANGE_OR_INT : ( INT ".."
我已经开始学习 ANTLR,并且拥有 2007 年的书《The Definitive ANTLR Reference》和 ANTLRWorks(用于创建语法的交互式工具)。而且,作为这样的人,我从第三
我正在开发 D 语言的解析器,当我尝试添加“切片”运算符规则时遇到了麻烦。你可以找到它的ANTLR语法here 。基本上问题是,如果词法分析器遇到这样的字符串:“1..2”,它就会完全丢失,并且最终成
在 ANTLR 语法中,我们如何区分变量名和标识符? VAR: ('A'..'Z')+ DIGIT* ; IDENT : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'
我想在 ANTLR 语法中解析 ISO 8601 日期。 2001-05-03 我的语法文件中有以下条目: date : FOUR_DIGIT ('-')? TWO_DIGIT ('-')? T
我们有一个为 antlr V3 编写的语法,我想迁移到 antlr v4。有没有迁移指南。我还想知道对现有 V3 语法的修改,以便我们很好地利用 v4 的功能。 最佳答案 如果您在 v3 或更早版本中
我正在尝试在一台新计算机上使用 ANTLR v4 语法插件在 IntelliJ 中运行一个简单的语法文件。我已经按照在线步骤在 IntelliJ 中安装插件,插件看起来安装正确。我在 .g4 语法文件
我正在使用 ANTLR 为旧的专有报告规范编写一个解析器,目前我正在尝试实现生成的解析树的访问者,以扩展自动生成的抽象访问类。 我对 ANTLR(我最近才学会)和一般的访问者模式都没有什么经验,但是如
我知道插入符号后缀在 antlr 中的含义(即 make root)但是当插入符号是我一直在阅读的以下语法中的前缀时呢(该语法是全新的,由学习 antlr 的新团队完成)。 .. selectClau
我不知道这个问题是否有效,因为我对源代码解析不是很熟悉。我的目标是为一种现有的编程语言(语言“X”)编写一个源代码完成函数,以供学习之用。 Antlr(v4) 是否适合这样的任务,还是应该手动完成必要
请查看源代码:https://gist.github.com/1684022 . 我定义了两个 token : ID : ('a'..'z' | 'A'..'Z') ('0'..'9' | 'a
我知道“+”、“?”和 '*'。但是,如果我希望某事重复 5 次,该怎么办?例如,如果标识符必须是长度为 5 的十六进制数字符串? 更具体地说,我正在考虑定义一个无限长度的通用词法分析器规则,然后在解
如何控制切换Antlr来自解析器操作的词法分析器模式? 我扩展了生成的 Parser 和 Lexer,所以我可以调用 pushMode和 popMode从解析器女巫依次调用合适的pushMode和 p
我正在使用 ANTLR 来标记一个简单的语法,并且需要区分一个 ID: ID : LETTER (LETTER | DIGIT)* ; fragment DIGIT : '
我有一个这样的 ANTLR 规则 receive returns[Evaluator e,String message] : RECEIVE FILENAME {$e= new ReceiveEv
我是一名优秀的程序员,十分优秀!