org.jacaranda.verifier
Class JacarandaTreeAdaptor

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTreeAdaptor
      extended by org.antlr.runtime.tree.CommonTreeAdaptor
          extended by org.jacaranda.verifier.JacarandaTreeAdaptor
All Implemented Interfaces:
org.antlr.runtime.tree.TreeAdaptor

public class JacarandaTreeAdaptor
extends org.antlr.runtime.tree.CommonTreeAdaptor

A very simple TreeAdaptor that tells ANTLR to use JacarandaTree instead of CommonTree, and that delegates addition of children and rule post-processing to JacarandaTree. Since JacarandaTree extends CommonTree, most of the methods from CommonTreeAdaptor do not need to be overridden.


Field Summary
 
Fields inherited from class org.antlr.runtime.tree.BaseTreeAdaptor
treeToUniqueIDMap, uniqueNodeID
 
Constructor Summary
JacarandaTreeAdaptor(int howMuchTree)
           
 
Method Summary
 void addChild(java.lang.Object parent, java.lang.Object child)
           
 java.lang.Object becomeRoot(java.lang.Object newRoot, java.lang.Object oldRoot)
           
 java.lang.Object create(org.antlr.runtime.Token payload)
           
 org.antlr.runtime.Token createToken(int tokenType, java.lang.String text)
           
 org.antlr.runtime.Token createToken(org.antlr.runtime.Token fromToken)
           
 java.lang.Object dupNode(java.lang.Object old)
           
 java.lang.Object errorNode(org.antlr.runtime.TokenStream input, org.antlr.runtime.Token start, org.antlr.runtime.Token stop, org.antlr.runtime.RecognitionException re)
           
 int getUniqueID(java.lang.Object node)
           
 java.lang.Object rulePostProcessing(java.lang.Object rule)
           
 java.lang.Object setChild(java.lang.Object parent, java.lang.Object child)
           
 
Methods inherited from class org.antlr.runtime.tree.CommonTreeAdaptor
getChild, getChildCount, getChildIndex, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, replaceChildren, setChildIndex, setParent, setTokenBoundaries
 
Methods inherited from class org.antlr.runtime.tree.BaseTreeAdaptor
becomeRoot, create, create, create, deleteChild, dupTree, dupTree, isNil, nil, setChild, setText, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JacarandaTreeAdaptor

public JacarandaTreeAdaptor(int howMuchTree)
Method Detail

createToken

public org.antlr.runtime.Token createToken(int tokenType,
                                           java.lang.String text)
Overrides:
createToken in class org.antlr.runtime.tree.CommonTreeAdaptor

createToken

public org.antlr.runtime.Token createToken(org.antlr.runtime.Token fromToken)
Overrides:
createToken in class org.antlr.runtime.tree.CommonTreeAdaptor

create

public java.lang.Object create(org.antlr.runtime.Token payload)
Specified by:
create in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
create in class org.antlr.runtime.tree.CommonTreeAdaptor

dupNode

public java.lang.Object dupNode(java.lang.Object old)
Specified by:
dupNode in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
dupNode in class org.antlr.runtime.tree.CommonTreeAdaptor

errorNode

public java.lang.Object errorNode(org.antlr.runtime.TokenStream input,
                                  org.antlr.runtime.Token start,
                                  org.antlr.runtime.Token stop,
                                  org.antlr.runtime.RecognitionException re)
Specified by:
errorNode in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
errorNode in class org.antlr.runtime.tree.BaseTreeAdaptor

addChild

public void addChild(java.lang.Object parent,
                     java.lang.Object child)
Specified by:
addChild in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
addChild in class org.antlr.runtime.tree.BaseTreeAdaptor

setChild

public java.lang.Object setChild(java.lang.Object parent,
                                 java.lang.Object child)

getUniqueID

public int getUniqueID(java.lang.Object node)
Specified by:
getUniqueID in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
getUniqueID in class org.antlr.runtime.tree.BaseTreeAdaptor

becomeRoot

public java.lang.Object becomeRoot(java.lang.Object newRoot,
                                   java.lang.Object oldRoot)
Specified by:
becomeRoot in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
becomeRoot in class org.antlr.runtime.tree.BaseTreeAdaptor

rulePostProcessing

public java.lang.Object rulePostProcessing(java.lang.Object rule)
Specified by:
rulePostProcessing in interface org.antlr.runtime.tree.TreeAdaptor
Overrides:
rulePostProcessing in class org.antlr.runtime.tree.BaseTreeAdaptor