本文整理汇总了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;
}
示例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()));
}
}
示例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));
}
示例4: CParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public CParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例5: FWPolicyParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public FWPolicyParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this, _ATN, _decisionToDFA,
_sharedContextCache);
}
示例6: SqlGrammarParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public SqlGrammarParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
示例7: CypherParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public CypherParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例8: ExpressionEditorParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ExpressionEditorParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例9: ExprParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ExprParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例10: Verilog2001Parser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public Verilog2001Parser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例11: ObjCParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public ObjCParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
示例12: HelloParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public HelloParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例13: AccountingParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public AccountingParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
示例14: EditorConfigParser
import org.antlr.v4.runtime.atn.ParserATNSimulator; //导入依赖的package包/类
public EditorConfigParser(TokenStream input) {
super(input);
_interp = new ParserATNSimulator(this, _ATN, _decisionToDFA, _sharedContextCache);
}
示例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()));
}