public class TreeRewriter extends TreeParser
| Modifier and Type | Class and Description |
|---|---|
static interface |
TreeRewriter.fptr |
| Modifier and Type | Field and Description |
|---|---|
protected TreeAdaptor |
originalAdaptor |
protected TokenStream |
originalTokenStream |
protected boolean |
showTransformations |
DOWN, input, UPDEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state| Constructor and Description |
|---|
TreeRewriter(TreeNodeStream input) |
TreeRewriter(TreeNodeStream input,
RecognizerSharedState state) |
| Modifier and Type | Method and Description |
|---|---|
Object |
applyOnce(Object t,
TreeRewriter.fptr whichRule) |
Object |
applyRepeatedly(Object t,
TreeRewriter.fptr whichRule) |
Object |
bottomup() |
Object |
downup(Object t) |
Object |
downup(Object t,
boolean showTransformations) |
void |
reportTransformation(Object oldTree,
Object newTree)
Override this if you need transformation tracing to go somewhere
other than stdout or if you're not using Tree-derived trees.
|
Object |
topdown() |
getAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOutalreadyParsedRule, beginResync, combineFollows, computeContextSensitiveRuleFOLLOW, computeErrorRecoverySet, consumeUntil, consumeUntil, displayRecognitionError, emitErrorMessage, endResync, failed, getBacktrackingLevel, getGrammarFileName, getNumberOfSyntaxErrors, getRuleInvocationStack, getRuleInvocationStack, getRuleMemoization, getRuleMemoizationCacheSize, getTokenErrorDisplay, getTokenNames, match, memoize, mismatchIsMissingToken, mismatchIsUnwantedToken, pushFollow, recover, recoverFromMismatchedSet, reportError, setBacktrackingLevel, toStrings, traceIn, traceOutprotected boolean showTransformations
protected TokenStream originalTokenStream
protected TreeAdaptor originalAdaptor
public TreeRewriter(TreeNodeStream input)
public TreeRewriter(TreeNodeStream input, RecognizerSharedState state)
public Object applyOnce(Object t, TreeRewriter.fptr whichRule)
public Object applyRepeatedly(Object t, TreeRewriter.fptr whichRule)
public void reportTransformation(Object oldTree, Object newTree)
public Object topdown() throws RecognitionException
RecognitionExceptionpublic Object bottomup() throws RecognitionException
RecognitionExceptionCopyright © 1992-2013 ANTLR. All Rights Reserved.