当前位置: 首页>>代码示例>>Java>>正文


Java ParserATNSimulator类代码示例

本文整理汇总了Java中org.antlr.v4.runtime.atn.ParserATNSimulator的典型用法代码示例。如果您正苦于以下问题:Java ParserATNSimulator类的具体用法?Java ParserATNSimulator怎么用?Java ParserATNSimulator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ParserATNSimulator类属于org.antlr.v4.runtime.atn包,在下文中一共展示了ParserATNSimulator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getParseInfo

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
@Override
public ParseInfo getParseInfo() {
	ParserATNSimulator interp = getInterpreter();
	if (interp instanceof ProfilingATNSimulator) {
		return new ParseInfo((ProfilingATNSimulator)interp);
	}
	return null;
}
 
开发者ID:MegaApuTurkUltra,项目名称:Scratch-ApuC,代码行数:9,代码来源:Parser.java

示例2: setProfile

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
/**
 * @since 4.3
 */
public void setProfile(boolean profile) {
	ParserATNSimulator interp = getInterpreter();
	if ( profile ) {
		if (!(interp instanceof ProfilingATNSimulator)) {
			setInterpreter(new ProfilingATNSimulator(this));
		}
	}
	else if (interp instanceof ProfilingATNSimulator) {
		setInterpreter(new ParserATNSimulator(this, getATN(), interp.decisionToDFA, interp.getSharedContextCache()));
	}
}
 
开发者ID:MegaApuTurkUltra,项目名称:Scratch-ApuC,代码行数:15,代码来源:Parser.java

示例3: ParserInterpreter

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ParserInterpreter(String grammarFileName, Collection<String> tokenNames,
						 Collection<String> ruleNames, ATN atn, TokenStream input)
{
	super(input);
	this.grammarFileName = grammarFileName;
	this.atn = atn;
	this.tokenNames = tokenNames.toArray(new String[tokenNames.size()]);
	this.ruleNames = ruleNames.toArray(new String[ruleNames.size()]);
	this.decisionToDFA = new DFA[atn.getNumberOfDecisions()];
	for (int i = 0; i < decisionToDFA.length; i++) {
		decisionToDFA[i] = new DFA(atn.getDecisionState(i), i);
	}

	// identify the ATN states where pushNewRecursionContext must be called
	this.pushRecursionContextStates = new BitSet(atn.states.size());
	for (ATNState state : atn.states) {
		if (!(state instanceof StarLoopEntryState)) {
			continue;
		}

		if (((StarLoopEntryState)state).precedenceRuleDecision) {
			this.pushRecursionContextStates.set(state.stateNumber);
		}
	}

	// get atn simulator that knows how to do predictions
	setInterpreter(new ParserATNSimulator(this, atn,
										  decisionToDFA,
										  sharedContextCache));
}
 
开发者ID:MegaApuTurkUltra,项目名称:Scratch-ApuC,代码行数:31,代码来源:ParserInterpreter.java

示例4: CParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public CParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:Skypr,项目名称:BEAST,代码行数:5,代码来源:CParser.java

示例5: FWPolicyParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public FWPolicyParser(TokenStream input) {
    super(input);
    _interp = new ParserATNSimulator(this, _ATN, _decisionToDFA,
            _sharedContextCache);
}
 
开发者ID:servicecatalog,项目名称:oscm-app,代码行数:6,代码来源:FWPolicyParser.java

示例6: SqlGrammarParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public SqlGrammarParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
 
开发者ID:michalwojciechowski,项目名称:coherence-sql,代码行数:5,代码来源:SqlGrammarParser.java

示例7: CypherParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public CypherParser(TokenStream input) {
    super(input);
    _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:DTG-FRESCO,项目名称:cyp2sql,代码行数:5,代码来源:CypherParser.java

示例8: ExpressionEditorParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ExpressionEditorParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:5,代码来源:ExpressionEditorParser.java

示例9: ExprParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ExprParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:kylepls,项目名称:Expr3,代码行数:5,代码来源:ExprParser.java

示例10: Verilog2001Parser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public Verilog2001Parser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:xprova,项目名称:netlist-graph,代码行数:5,代码来源:Verilog2001Parser.java

示例11: ObjCParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ObjCParser(TokenStream input) {
    super(input);
    _interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
 
开发者ID:Consoar,项目名称:Objc2Lua,代码行数:5,代码来源:ObjCParser.java

示例12: HelloParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public HelloParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:BruceZu,项目名称:KeepTry,代码行数:5,代码来源:HelloParser.java

示例13: AccountingParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public AccountingParser(TokenStream input) {
	super(input);
	_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
 
开发者ID:yongli82,项目名称:dsl,代码行数:5,代码来源:AccountingParser.java

示例14: EditorConfigParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public EditorConfigParser(TokenStream input) {
    super(input);
    _interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
 
开发者ID:junichi11,项目名称:netbeans-editorconfig-editor,代码行数:5,代码来源:EditorConfigParser.java

示例15: GroovyLangParser

import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public GroovyLangParser(TokenStream input) {
    super(input);

    this.setInterpreter(new ParserATNSimulator(this, new AtnManager(this).getATN()));
}
 
开发者ID:apache,项目名称:groovy,代码行数:6,代码来源:GroovyLangParser.java


注:本文中的org.antlr.v4.runtime.atn.ParserATNSimulator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。