| java.lang.Object org.antlr.runtime.BaseRecognizer org.antlr.runtime.tree.TreeParser
All known Subclasses: org.antlr.runtime.debug.DebugTreeParser,
TreeParser | public class TreeParser extends BaseRecognizer (Code) | | A parser for a stream of tree nodes. "tree grammars" result in a subclass
of this. All the error reporting and recovery is shared with Parser via
the BaseRecognizer superclass.
|
DOWN | final public static int DOWN(Code) | | |
UP | final public static int UP(Code) | | |
getErrorHeader | public String getErrorHeader(RecognitionException e)(Code) | | Prefix error message with the grammar name because message is
always intended for the programmer because the parser built
the input tree not the user.
|
getErrorMessage | public String getErrorMessage(RecognitionException e, String[] tokenNames)(Code) | | Tree parsers parse nodes they usually have a token object as
payload. Set the exception token and do the default behavior.
|
matchAny | public void matchAny(IntStream ignore)(Code) | | Match '.' in tree parser has special meaning. Skip node or
entire tree if node has children. If children, scan until
corresponding UP node.
|
mismatch | protected void mismatch(IntStream input, int ttype, BitSet follow) throws RecognitionException(Code) | | We have DOWN/UP nodes in the stream that have no line info; override.
plus we want to alter the exception type.
|
reset | public void reset()(Code) | | |
traceIn | public void traceIn(String ruleName, int ruleIndex)(Code) | | |
traceOut | public void traceOut(String ruleName, int ruleIndex)(Code) | | |
Methods inherited from org.antlr.runtime.BaseRecognizer | public boolean alreadyParsedRule(IntStream input, int ruleIndex)(Code)(Java Doc) public void beginResync()(Code)(Java Doc) protected BitSet combineFollows(boolean exact)(Code)(Java Doc) protected BitSet computeContextSensitiveRuleFOLLOW()(Code)(Java Doc) protected BitSet computeErrorRecoverySet()(Code)(Java Doc) public void consumeUntil(IntStream input, int tokenType)(Code)(Java Doc) public void consumeUntil(IntStream input, BitSet set)(Code)(Java Doc) public void displayRecognitionError(String[] tokenNames, RecognitionException e)(Code)(Java Doc) public void emitErrorMessage(String msg)(Code)(Java Doc) public void endResync()(Code)(Java Doc) public int getBacktrackingLevel()(Code)(Java Doc) public String getErrorHeader(RecognitionException e)(Code)(Java Doc) public String getErrorMessage(RecognitionException e, String[] tokenNames)(Code)(Java Doc) public String getGrammarFileName()(Code)(Java Doc) public List getRuleInvocationStack()(Code)(Java Doc) public static List getRuleInvocationStack(Throwable e, String recognizerClassName)(Code)(Java Doc) public int getRuleMemoization(int ruleIndex, int ruleStartIndex)(Code)(Java Doc) public int getRuleMemoizationCacheSize()(Code)(Java Doc) public String getTokenErrorDisplay(Token t)(Code)(Java Doc) public String[] getTokenNames()(Code)(Java Doc) public void match(IntStream input, int ttype, BitSet follow) throws RecognitionException(Code)(Java Doc) public void matchAny(IntStream input)(Code)(Java Doc) public void memoize(IntStream input, int ruleIndex, int ruleStartIndex)(Code)(Java Doc) protected void mismatch(IntStream input, int ttype, BitSet follow) throws RecognitionException(Code)(Java Doc) protected void pushFollow(BitSet fset)(Code)(Java Doc) public void recover(IntStream input, RecognitionException re)(Code)(Java Doc) protected boolean recoverFromMismatchedElement(IntStream input, RecognitionException e, BitSet follow)(Code)(Java Doc) public void recoverFromMismatchedSet(IntStream input, RecognitionException e, BitSet follow) throws RecognitionException(Code)(Java Doc) public void recoverFromMismatchedToken(IntStream input, RecognitionException e, int ttype, BitSet follow) throws RecognitionException(Code)(Java Doc) public void reportError(RecognitionException e)(Code)(Java Doc) public void reset()(Code)(Java Doc) public List toStrings(List tokens)(Code)(Java Doc) public void traceIn(String ruleName, int ruleIndex, Object inputSymbol)(Code)(Java Doc) public void traceOut(String ruleName, int ruleIndex, Object inputSymbol)(Code)(Java Doc)
|
|
|