jtb.syntaxtree
Class NodeToken

Object
  extended by NodeToken
All Implemented Interfaces:
Serializable, Node

public class NodeToken
extends Object
implements Node

Represents a single token in the grammar. If the "-tk" option is used, also contains a Vector of preceding special tokens.

See Also:
Serialized Form

Field Summary
 int beginColumn
           
 int beginLine
           
 int endColumn
           
 int endLine
           
 int kind
           
 Vector<NodeToken> specialTokens
           
 String tokenImage
           
 
Constructor Summary
NodeToken(String s)
           
NodeToken(String s, int kind, int beginLine, int beginColumn, int endLine, int endColumn)
           
 
Method Summary
<R> R
accept(GJNoArguVisitor<R> v)
           
<R,A> R
accept(GJVisitor<R,A> v, A argu)
           
<A> void
accept(GJVoidVisitor<A> v, A argu)
           
 void accept(Visitor v)
           
 void addSpecial(NodeToken s)
           
 Node getParent()
           
 NodeToken getSpecialAt(int i)
           
 int numSpecials()
           
 void setParent(Node n)
           
 String toString()
           
 void trimSpecials()
           
 String withSpecials()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tokenImage

public String tokenImage

specialTokens

public Vector<NodeToken> specialTokens

beginLine

public int beginLine

beginColumn

public int beginColumn

endLine

public int endLine

endColumn

public int endColumn

kind

public int kind
Constructor Detail

NodeToken

public NodeToken(String s)

NodeToken

public NodeToken(String s,
                 int kind,
                 int beginLine,
                 int beginColumn,
                 int endLine,
                 int endColumn)
Method Detail

getSpecialAt

public NodeToken getSpecialAt(int i)

numSpecials

public int numSpecials()

addSpecial

public void addSpecial(NodeToken s)

trimSpecials

public void trimSpecials()

toString

public String toString()
Overrides:
toString in class Object

withSpecials

public String withSpecials()

accept

public void accept(Visitor v)
Specified by:
accept in interface Node

accept

public <R,A> R accept(GJVisitor<R,A> v,
                      A argu)
Specified by:
accept in interface Node

accept

public <R> R accept(GJNoArguVisitor<R> v)
Specified by:
accept in interface Node

accept

public <A> void accept(GJVoidVisitor<A> v,
                       A argu)
Specified by:
accept in interface Node

setParent

public void setParent(Node n)
Specified by:
setParent in interface Node

getParent

public Node getParent()
Specified by:
getParent in interface Node