public class Parser extends BaseRecognizer
| Modifier and Type | Field and Description |
|---|---|
TokenStream |
input |
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state| Constructor and Description |
|---|
Parser(TokenStream input) |
Parser(TokenStream input,
RecognizerSharedState state) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
getCurrentInputSymbol(IntStream input)
Match needs to return the current input symbol, which gets put
into the label for the associated token ref; e.g., x=ID.
|
protected Object |
getMissingSymbol(IntStream input,
RecognitionException e,
int expectedTokenType,
BitSet follow)
Conjure up a missing token during error recovery.
|
String |
getSourceName() |
TokenStream |
getTokenStream() |
void |
reset()
reset the parser's state; subclasses must rewinds the input stream
|
void |
setTokenStream(TokenStream input)
Set the token stream and reset the parser
|
void |
traceIn(String ruleName,
int ruleIndex) |
void |
traceOut(String ruleName,
int ruleIndex) |
alreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, endResync, failed, getBacktrackingLevel, getErrorHeader, getErrorMessage, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, matchAny, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, recoverFromMismatchedToken, reportError, setBacktrackingLevel, toStrings, traceIn, traceOutpublic TokenStream input
public Parser(TokenStream input)
public Parser(TokenStream input, RecognizerSharedState state)
public void reset()
BaseRecognizerreset in class BaseRecognizerprotected Object getCurrentInputSymbol(IntStream input)
BaseRecognizergetCurrentInputSymbol in class BaseRecognizerprotected Object getMissingSymbol(IntStream input, RecognitionException e, int expectedTokenType, BitSet follow)
BaseRecognizergetMissingSymbol in class BaseRecognizerpublic void setTokenStream(TokenStream input)
public TokenStream getTokenStream()
public String getSourceName()
getSourceName in class BaseRecognizerpublic void traceIn(String ruleName, int ruleIndex)
public void traceOut(String ruleName, int ruleIndex)
Copyright © 1992-2013 ANTLR. All Rights Reserved.