public class DebugTreeParser extends TreeParser
Modifier and Type | Field | Description |
---|---|---|
protected DebugEventListener |
dbg |
Who to notify when events in the parser occur.
|
boolean |
isCyclicDecision |
Used to differentiate between fixed lookahead and cyclic DFA decisions
while profiling.
|
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
DOWN, input, UP
Constructor | Description |
---|---|
DebugTreeParser(TreeNodeStream input,
DebugEventListener dbg) |
|
DebugTreeParser(TreeNodeStream input,
DebugEventListener dbg,
RecognizerSharedState state) |
Create a normal parser except wrap the token stream in a debug
proxy that fires consume events.
|
DebugTreeParser(TreeNodeStream input,
RecognizerSharedState state) |
Modifier and Type | Method | Description |
---|---|---|
void |
beginBacktrack(int level) |
|
void |
beginResync() |
A hook to listen in on the token consumption during error recovery.
|
void |
endBacktrack(int level,
boolean successful) |
|
void |
endResync() |
|
DebugEventListener |
getDebugListener() |
|
protected Object |
getMissingSymbol(IntStream input,
RecognitionException e,
int expectedTokenType,
BitSet follow) |
Conjure up a missing token during error recovery.
|
void |
reportError(IOException e) |
|
void |
reportError(RecognitionException e) |
Report a recognition problem.
|
void |
setDebugListener(DebugEventListener dbg) |
Provide a new debug event listener for this parser.
|
alreadyParsedRule, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, failed, getBacktrackingLevel, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, setBacktrackingLevel, toStrings, traceIn, traceOut
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut
protected DebugEventListener dbg
public boolean isCyclicDecision
public DebugTreeParser(TreeNodeStream input, DebugEventListener dbg, RecognizerSharedState state)
public DebugTreeParser(TreeNodeStream input, RecognizerSharedState state)
public DebugTreeParser(TreeNodeStream input, DebugEventListener dbg)
public void setDebugListener(DebugEventListener dbg)
public DebugEventListener getDebugListener()
public void reportError(IOException e)
public void reportError(RecognitionException e)
BaseRecognizer
reportError
in class BaseRecognizer
protected Object getMissingSymbol(IntStream input, RecognitionException e, int expectedTokenType, BitSet follow)
BaseRecognizer
getMissingSymbol
in class TreeParser
public void beginResync()
BaseRecognizer
beginResync
in class BaseRecognizer
public void endResync()
endResync
in class BaseRecognizer
public void beginBacktrack(int level)
public void endBacktrack(int level, boolean successful)
Copyright © 1992–2018 ANTLR. All rights reserved.