本文整理了Java中org.antlr.v4.tool.Grammar.getOptionString()
方法的一些代码示例,展示了Grammar.getOptionString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Grammar.getOptionString()
方法的具体详情如下:
包路径:org.antlr.v4.tool.Grammar
类名称:Grammar
方法名:getOptionString
暂无
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public CodeGenerator(Grammar g) {
this(g.tool, g, g.getOptionString("language"));
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public CodeGenerator(Grammar g) {
this(g.tool, g, g.getOptionString("language"));
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public BuildDependencyGenerator(Tool tool, Grammar g) {
this.tool = tool;
this.g = g;
String language = g.getOptionString("language");
generator = new CodeGenerator(tool, g, language);
}
代码示例来源:origin: org.antlr/antlr4
public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4
public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
}
代码示例来源:origin: uk.co.nichesolutions/antlr4
public OutputFile(OutputModelFactory factory, String fileName) {
super(factory);
this.fileName = fileName;
Grammar g = factory.getGrammar();
grammarFileName = g.fileName;
ANTLRVersion = Tool.VERSION;
TokenLabelType = g.getOptionString("TokenLabelType");
InputSymbolType = TokenLabelType;
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public BuildDependencyGenerator(Tool tool, Grammar g) {
this.tool = tool;
this.g = g;
String language = g.getOptionString("language");
generator = new CodeGenerator(tool, g, language);
}
代码示例来源:origin: org.antlr/antlr4
public BuildDependencyGenerator(Tool tool, Grammar g) {
this.tool = tool;
this.g = g;
String language = g.getOptionString("language");
generator = new CodeGenerator(tool, g, language);
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4
public BuildDependencyGenerator(Tool tool, Grammar g) {
this.tool = tool;
this.g = g;
String language = g.getOptionString("language");
generator = new CodeGenerator(tool, g, language);
}
代码示例来源:origin: uk.co.nichesolutions/antlr4
public BuildDependencyGenerator(Tool tool, Grammar g) {
this.tool = tool;
this.g = g;
String language = g.getOptionString("language");
generator = new CodeGenerator(tool, g, language);
}
代码示例来源:origin: org.antlr/antlr4
public void importTokensFromTokensFile() {
String vocab = getOptionString("tokenVocab");
if ( vocab!=null ) {
TokenVocabParser vparser = new TokenVocabParser(this);
Map<String,Integer> tokens = vparser.load();
tool.log("grammar", "tokens=" + tokens);
for (String t : tokens.keySet()) {
if ( t.charAt(0)=='\'' ) defineStringLiteral(t, tokens.get(t));
else defineTokenName(t, tokens.get(t));
}
}
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4
public void importTokensFromTokensFile() {
String vocab = getOptionString("tokenVocab");
if ( vocab!=null ) {
TokenVocabParser vparser = new TokenVocabParser(this);
Map<String,Integer> tokens = vparser.load();
tool.log("grammar", "tokens=" + tokens);
for (String t : tokens.keySet()) {
if ( t.charAt(0)=='\'' ) defineStringLiteral(t, tokens.get(t));
else defineTokenName(t, tokens.get(t));
}
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public void importTokensFromTokensFile() {
String vocab = getOptionString("tokenVocab");
if ( vocab!=null ) {
TokenVocabParser vparser = new TokenVocabParser(this);
Map<String,Integer> tokens = vparser.load();
tool.log("grammar", "tokens=" + tokens);
for (String t : tokens.keySet()) {
if ( t.charAt(0)=='\'' ) defineStringLiteral(t, tokens.get(t));
else defineTokenName(t, tokens.get(t));
}
}
}
代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded
public void importTokensFromTokensFile() {
String vocab = getOptionString("tokenVocab");
if ( vocab!=null ) {
TokenVocabParser vparser = new TokenVocabParser(this);
Map<String,Integer> tokens = vparser.load();
tool.log("grammar", "tokens=" + tokens);
for (String t : tokens.keySet()) {
if ( t.charAt(0)=='\'' ) defineStringLiteral(t, tokens.get(t));
else defineTokenName(t, tokens.get(t));
}
}
}
代码示例来源:origin: uk.co.nichesolutions/antlr4
public void importTokensFromTokensFile() {
String vocab = getOptionString("tokenVocab");
if ( vocab!=null ) {
TokenVocabParser vparser = new TokenVocabParser(this);
Map<String,Integer> tokens = vparser.load();
tool.log("grammar", "tokens=" + tokens);
for (String t : tokens.keySet()) {
if ( t.charAt(0)=='\'' ) defineStringLiteral(t, tokens.get(t));
else defineTokenName(t, tokens.get(t));
}
}
}
代码示例来源:origin: org.antlr/antlr4
public LexerFile(OutputModelFactory factory, String fileName) {
super(factory, fileName);
namedActions = buildNamedActions(factory.getGrammar());
genPackage = factory.getGrammar().tool.genPackage;
exportMacro = factory.getGrammar().getOptionString("exportMacro");
genListener = factory.getGrammar().tool.gen_listener;
genVisitor = factory.getGrammar().tool.gen_visitor;
}
}
代码示例来源:origin: com.tunnelvisionlabs/antlr4
public LexerFile(OutputModelFactory factory, String fileName) {
super(factory, fileName);
namedActions = buildNamedActions(factory.getGrammar());
genPackage = factory.getGrammar().tool.genPackage;
exportMacro = factory.getGrammar().getOptionString("exportMacro");
genListener = factory.getGrammar().tool.gen_listener;
genVisitor = factory.getGrammar().tool.gen_visitor;
}
}
代码示例来源:origin: io.virtdata/virtdata-lib-realer
public LexerFile(OutputModelFactory factory, String fileName) {
super(factory, fileName);
namedActions = buildNamedActions(factory.getGrammar());
genPackage = factory.getGrammar().tool.genPackage;
exportMacro = factory.getGrammar().getOptionString("exportMacro");
genListener = factory.getGrammar().tool.gen_listener;
genVisitor = factory.getGrammar().tool.gen_visitor;
}
}
内容来源于网络,如有侵权,请联系作者删除!