C# 클래스 Antlr4.Runtime.ParserInterpreter

A parser simulator that mimics what ANTLR's generated parser code does.
A parser simulator that mimics what ANTLR's generated parser code does. A ParserATNSimulator is used to make predictions via adaptivePredict but this class moves a pointer through the ATN to simulate parsing. ParserATNSimulator just makes us efficient rather than having to backtrack, for example. This properly creates parse trees even for left recursive rules. We rely on the left recursive rule invocation and special predicate transitions to make left recursive rules work. See TestParserInterpreter for examples.
상속: Parser
파일 보기 프로젝트 열기: antlr/antlr4 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
pushRecursionContextStates Antlr4.Runtime.Sharpen.BitSet

공개 메소드들

메소드 설명
EnterRecursionRule ( ParserRuleContext localctx, int state, int ruleIndex, int precedence ) : void
Parse ( int startRuleIndex ) : ParserRuleContext

Begin parsing at startRuleIndex

ParserInterpreter ( string grammarFileName, IVocabulary vocabulary, IEnumerable ruleNames, ATN atn, ITokenStream input ) : System

보호된 메소드들

메소드 설명
VisitRuleStopState ( ATNState p ) : void
VisitState ( ATNState p ) : void

메소드 상세

EnterRecursionRule() 공개 메소드

public EnterRecursionRule ( ParserRuleContext localctx, int state, int ruleIndex, int precedence ) : void
localctx ParserRuleContext
state int
ruleIndex int
precedence int
리턴 void

Parse() 공개 메소드

Begin parsing at startRuleIndex
public Parse ( int startRuleIndex ) : ParserRuleContext
startRuleIndex int
리턴 ParserRuleContext

ParserInterpreter() 공개 메소드

public ParserInterpreter ( string grammarFileName, IVocabulary vocabulary, IEnumerable ruleNames, ATN atn, ITokenStream input ) : System
grammarFileName string
vocabulary IVocabulary
ruleNames IEnumerable
atn Antlr4.Runtime.Atn.ATN
input ITokenStream
리턴 System

VisitRuleStopState() 보호된 메소드

protected VisitRuleStopState ( ATNState p ) : void
p Antlr4.Runtime.Atn.ATNState
리턴 void

VisitState() 보호된 메소드

protected VisitState ( ATNState p ) : void
p Antlr4.Runtime.Atn.ATNState
리턴 void

프로퍼티 상세

pushRecursionContextStates 보호되어 있는 프로퍼티

protected BitSet,Antlr4.Runtime.Sharpen pushRecursionContextStates
리턴 Antlr4.Runtime.Sharpen.BitSet