Class TreeRewriter
- java.lang.Object
-
- org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer
-
- org.eclipse.persistence.internal.libraries.antlr.runtime.tree.TreeParser
-
- org.eclipse.persistence.internal.libraries.antlr.runtime.tree.TreeRewriter
-
public class TreeRewriter extends TreeParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceTreeRewriter.fptr
-
Field Summary
Fields Modifier and Type Field Description protected TreeAdaptororiginalAdaptorprotected TokenStreamoriginalTokenStreamprotected booleanshowTransformations-
Fields inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.tree.TreeParser
DOWN, input, UP
-
Fields inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer
DEFAULT_TOKEN_CHANNEL, HIDDEN, INITIAL_FOLLOW_STACK_SIZE, MEMO_RULE_FAILED, MEMO_RULE_UNKNOWN, NEXT_TOKEN_RULE_NAME, state
-
-
Constructor Summary
Constructors Constructor Description TreeRewriter(TreeNodeStream input)TreeRewriter(TreeNodeStream input, RecognizerSharedState state)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectapplyOnce(java.lang.Object t, TreeRewriter.fptr whichRule)java.lang.ObjectapplyRepeatedly(java.lang.Object t, TreeRewriter.fptr whichRule)java.lang.Objectbottomup()java.lang.Objectdownup(java.lang.Object t)java.lang.Objectdownup(java.lang.Object t, boolean showTransformations)voidreportTransformation(java.lang.Object oldTree, java.lang.Object newTree)Override this if you need transformation tracing to go somewhere other than stdout or if you're not using Tree-derived trees.java.lang.Objecttopdown()-
Methods inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.tree.TreeParser
getAncestor, getCurrentInputSymbol, getErrorHeader, getErrorMessage, getMissingSymbol, getSourceName, getTreeNodeStream, inContext, inContext, matchAny, recoverFromMismatchedToken, reset, setTreeNodeStream, traceIn, traceOut
-
Methods inherited from class org.eclipse.persistence.internal.libraries.antlr.runtime.BaseRecognizer
alreadyParsedRule, 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, traceOut
-
-
-
-
Field Detail
-
showTransformations
protected boolean showTransformations
-
originalTokenStream
protected TokenStream originalTokenStream
-
originalAdaptor
protected TreeAdaptor originalAdaptor
-
-
Constructor Detail
-
TreeRewriter
public TreeRewriter(TreeNodeStream input)
-
TreeRewriter
public TreeRewriter(TreeNodeStream input, RecognizerSharedState state)
-
-
Method Detail
-
applyOnce
public java.lang.Object applyOnce(java.lang.Object t, TreeRewriter.fptr whichRule)
-
applyRepeatedly
public java.lang.Object applyRepeatedly(java.lang.Object t, TreeRewriter.fptr whichRule)
-
downup
public java.lang.Object downup(java.lang.Object t)
-
downup
public java.lang.Object downup(java.lang.Object t, boolean showTransformations)
-
reportTransformation
public void reportTransformation(java.lang.Object oldTree, java.lang.Object newTree)Override this if you need transformation tracing to go somewhere other than stdout or if you're not using Tree-derived trees.
-
topdown
public java.lang.Object topdown() throws RecognitionException- Throws:
RecognitionException
-
bottomup
public java.lang.Object bottomup() throws RecognitionException- Throws:
RecognitionException
-
-