Package org.javacc.jjtree
Class JJTreeNode
- java.lang.Object
-
- org.javacc.jjtree.SimpleNode
-
- org.javacc.jjtree.JJTreeNode
-
- All Implemented Interfaces:
Node
- Direct Known Subclasses:
ASTBNFAction,ASTBNFAssignment,ASTBNFChoice,ASTBNFDeclaration,ASTBNFLookahead,ASTBNFNodeScope,ASTBNFNonTerminal,ASTBNFOneOrMore,ASTBNFParenthesized,ASTBNFSequence,ASTBNFTryBlock,ASTBNFZeroOrMore,ASTBNFZeroOrOne,ASTCharDescriptor,ASTCompilationUnit,ASTExpansionNodeScope,ASTGrammar,ASTJavacodeBody,ASTNodeDescriptor,ASTNodeDescriptorExpression,ASTOptionBinding,ASTOptions,ASTPrimaryExpression,ASTProduction,ASTProductions,ASTRE,ASTRECharList,ASTREChoice,ASTREEOF,ASTRENamed,ASTREOneOrMore,ASTREParenthesized,ASTREReference,ASTRESequence,ASTRESpec,ASTREStringLiteral,ASTREZeroOrMore,ASTREZeroOrOne,ASTRRepetitionRange,ASTTokenDecls
public class JJTreeNode extends SimpleNode
-
-
Field Summary
Fields Modifier and Type Field Description private TokenfirstThe following is added manually to enhance all tree nodes with attributes that store the first and last tokens corresponding to each node, as well as to print the tokens back to the specified output stream.private TokenlastThe following is added manually to enhance all tree nodes with attributes that store the first and last tokens corresponding to each node, as well as to print the tokens back to the specified output stream.private intmyOrdinalprivate booleanwhitingOut
-
Constructor Summary
Constructors Constructor Description JJTreeNode(int id)JJTreeNode(JJTreeParser p, int i)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokengetFirstToken()TokengetLastToken()intgetOrdinal()voidjjtAddChild(Node n, int i)This method tells the node to add its argument to the node's list of children.voidprint(Token t, IO io)voidsetFirstToken(Token t)voidsetLastToken(Token t)voidsetOrdinal(int o)java.lang.StringtranslateImage(Token t)(package private) java.lang.StringwhiteOut(Token t)-
Methods inherited from class org.javacc.jjtree.SimpleNode
childrenAccept, dump, getId, jjtAccept, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtGetValue, jjtOpen, jjtSetParent, jjtSetValue, toString, toString
-
-
-
-
Field Detail
-
myOrdinal
private int myOrdinal
-
first
private Token first
The following is added manually to enhance all tree nodes with attributes that store the first and last tokens corresponding to each node, as well as to print the tokens back to the specified output stream.
-
last
private Token last
The following is added manually to enhance all tree nodes with attributes that store the first and last tokens corresponding to each node, as well as to print the tokens back to the specified output stream.
-
whitingOut
private boolean whitingOut
-
-
Constructor Detail
-
JJTreeNode
public JJTreeNode(int id)
-
JJTreeNode
public JJTreeNode(JJTreeParser p, int i)
-
-
Method Detail
-
jjtAddChild
public void jjtAddChild(Node n, int i)
Description copied from interface:NodeThis method tells the node to add its argument to the node's list of children.- Specified by:
jjtAddChildin interfaceNode- Overrides:
jjtAddChildin classSimpleNode
-
getOrdinal
public int getOrdinal()
-
setOrdinal
public void setOrdinal(int o)
-
getFirstToken
public Token getFirstToken()
-
setFirstToken
public void setFirstToken(Token t)
-
getLastToken
public Token getLastToken()
-
setLastToken
public void setLastToken(Token t)
-
translateImage
public java.lang.String translateImage(Token t)
-
whiteOut
java.lang.String whiteOut(Token t)
-
-