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

java.lang.Object
  extended by org.antlr.runtime.tree.BaseTree
      extended by org.antlr.runtime.tree.CommonTree
          extended by net.sourceforge.nrl.parser.ast.impl.Antlr3NRLBaseAst
All Implemented Interfaces:
INRLAstNode, org.antlr.runtime.tree.Tree
Direct Known Subclasses:
ActionImpl, CardinalityConstraintImpl, CompoundReportImpl, ConcatenatedReportImpl, ConditionalReportImpl, ConstraintImpl, DeclarationImpl, ModelFileReferenceImpl, ModelReferenceStep, NamedParameterImpl, OperatorFileReferenceImpl, RuleFileImpl, RuleSetDeclarationImpl

public class Antlr3NRLBaseAst
extends org.antlr.runtime.tree.CommonTree
implements INRLAstNode

The basic AST node, extends the ANTLR 3 AST.

Author:
Christian Nentwich

Field Summary
 
Fields inherited from class org.antlr.runtime.tree.CommonTree
childIndex, parent, startIndex, stopIndex, token
 
Fields inherited from class org.antlr.runtime.tree.BaseTree
children
 
Fields inherited from interface net.sourceforge.nrl.parser.ast.INRLAstNode
NEWLINE
 
Fields inherited from interface org.antlr.runtime.tree.Tree
INVALID_NODE
 
Constructor Summary
Antlr3NRLBaseAst()
           
Antlr3NRLBaseAst(org.antlr.runtime.Token token)
           
 
Method Summary
 void accept(INRLAstVisitor visitor)
          Accept a visitor to this node.
protected  String doIndent(int indent)
          Return an indentation of the given size.
 String dump(int indent)
          Dump the AST and its children for debugging purposes
 int getColumn()
          Return the column in the input file where this node occurred.
 int getLine()
          Return the line in the input file where this node occurred.
 Object getUserData(String key)
          Return a named user data object associated with this AST node.
 void initialisePositionFromChild(int childPos)
           
 void setColumn(int column)
           
 void setLine(int line)
           
 void setUserData(String key, Object data)
          Associate user data with this AST node, under a given key.
 
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getChildIndex, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
 
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, getAncestor, getAncestors, getChild, getChildCount, getChildren, getFirstChildWithType, hasAncestor, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Antlr3NRLBaseAst

public Antlr3NRLBaseAst()

Antlr3NRLBaseAst

public Antlr3NRLBaseAst(org.antlr.runtime.Token token)
Method Detail

accept

public void accept(INRLAstVisitor visitor)
Description copied from interface: INRLAstNode
Accept a visitor to this node.

Specified by:
accept in interface INRLAstNode
Parameters:
visitor - the visitor

doIndent

protected String doIndent(int indent)
Return an indentation of the given size.

Parameters:
indent - the indentation
Returns:
a string of spaces

dump

public String dump(int indent)
Description copied from interface: INRLAstNode
Dump the AST and its children for debugging purposes

Specified by:
dump in interface INRLAstNode
Parameters:
indent - the indentation count, 0 on first call
Returns:
the AST as a string

getColumn

public int getColumn()
Description copied from interface: INRLAstNode
Return the column in the input file where this node occurred.

Specified by:
getColumn in interface INRLAstNode
Returns:
the column, 1-based

getLine

public int getLine()
Description copied from interface: INRLAstNode
Return the line in the input file where this node occurred.

Specified by:
getLine in interface INRLAstNode
Specified by:
getLine in interface org.antlr.runtime.tree.Tree
Overrides:
getLine in class org.antlr.runtime.tree.CommonTree
Returns:
the line, 1-based

getUserData

public Object getUserData(String key)
Description copied from interface: INRLAstNode
Return a named user data object associated with this AST node.

Specified by:
getUserData in interface INRLAstNode
Parameters:
key - the key identifying the data
Returns:
the object or null if no such data

initialisePositionFromChild

public void initialisePositionFromChild(int childPos)

setLine

public void setLine(int line)

setColumn

public void setColumn(int column)

setUserData

public void setUserData(String key,
                        Object data)
Description copied from interface: INRLAstNode
Associate user data with this AST node, under a given key.

Specified by:
setUserData in interface INRLAstNode
Parameters:
key - the key
data - the data


Copyright © 2006-2013. All Rights Reserved.