net.sourceforge.nrl.parser.ast.impl
Class Antlr3NRLTreeAdaptor

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTreeAdaptor
      extended by org.antlr.runtime.tree.CommonTreeAdaptor
          extended by net.sourceforge.nrl.parser.ast.impl.Antlr3NRLTreeAdaptor
All Implemented Interfaces:
org.antlr.runtime.tree.TreeAdaptor

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

The new tree adaptor class for ANTLR 3: this maps token types that are represented as tree nodes to proper classes in the net.sourceforge.nrl.parser.ast.impl package.

This is much neater than in ANTLR 2: if the token names get out of line with the contents of this class, you will find a compiler error in here.

Author:
Christian Nentwich

Field Summary
protected  Map<Integer,Class<?>> tokenTypeToClass
           
 
Fields inherited from class org.antlr.runtime.tree.BaseTreeAdaptor
treeToUniqueIDMap, uniqueNodeID
 
Constructor Summary
Antlr3NRLTreeAdaptor()
           
 
Method Summary
 Object create(org.antlr.runtime.Token token)
           
 
Methods inherited from class org.antlr.runtime.tree.CommonTreeAdaptor
createToken, createToken, dupNode, getChild, getChildCount, getChildIndex, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, replaceChildren, setChildIndex, setParent, setTokenBoundaries
 
Methods inherited from class org.antlr.runtime.tree.BaseTreeAdaptor
addChild, becomeRoot, becomeRoot, create, create, create, deleteChild, dupTree, dupTree, errorNode, getUniqueID, isNil, nil, rulePostProcessing, setChild, setText, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenTypeToClass

protected Map<Integer,Class<?>> tokenTypeToClass
Constructor Detail

Antlr3NRLTreeAdaptor

public Antlr3NRLTreeAdaptor()
Method Detail

create

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


Copyright © 2006-2013. All Rights Reserved.