public class ParsingState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
ExtendedStackTrace |
extendedStackTrace |
int |
lexerIndex |
int |
lexerSize |
ParsingEventListener[] |
parsingEventListeners |
Constructor and Description |
---|
ParsingState(java.util.List<Token> tokens) |
Modifier and Type | Method and Description |
---|---|
void |
addListeners(RecognitionExceptionListener... listeners) |
void |
deleteMemoizedAstAfter(int index) |
AstNode |
getMemoizedAst(MemoizedMatcher matcher) |
Matcher |
getOutpostMatcher() |
Token |
getOutpostMatcherToken() |
int |
getOutpostMatcherTokenIndex() |
int |
getOutpostMatcherTokenLine() |
boolean |
hasMemoizedAst(MemoizedMatcher matcher) |
boolean |
hasNextToken() |
void |
memoizeAst(MemoizedMatcher matcher,
AstNode astNode) |
void |
notifyListeners(RecognitionException recognitionException) |
Token |
peekToken(int index,
Matcher matcher) |
Token |
peekToken(Matcher matcher) |
Token |
peekTokenIfExists(int index,
Matcher matcher) |
Token |
popToken(Matcher matcher) |
Token |
readToken(int tokenIndex) |
public int lexerIndex
public final int lexerSize
public ParsingEventListener[] parsingEventListeners
public ExtendedStackTrace extendedStackTrace
public ParsingState(java.util.List<Token> tokens)
public final Token popToken(Matcher matcher)
BacktrackingEvent
- when there is no next tokenpublic final boolean hasNextToken()
public final Token peekToken(int index, Matcher matcher)
BacktrackingEvent
- when there is no next tokenpublic final Token peekTokenIfExists(int index, Matcher matcher)
public final Token peekToken(Matcher matcher)
BacktrackingEvent
- when there is no next tokenpublic Token readToken(int tokenIndex)
public final Matcher getOutpostMatcher()
public Token getOutpostMatcherToken()
public final int getOutpostMatcherTokenIndex()
public final int getOutpostMatcherTokenLine()
public void memoizeAst(MemoizedMatcher matcher, AstNode astNode)
public final void deleteMemoizedAstAfter(int index)
public boolean hasMemoizedAst(MemoizedMatcher matcher)
public AstNode getMemoizedAst(MemoizedMatcher matcher)
public final void addListeners(RecognitionExceptionListener... listeners)
public final void notifyListeners(RecognitionException recognitionException)
Copyright © 2012 SonarSource. All Rights Reserved.