All Packages Class Hierarchy This Package Previous Next Index
Class edu.mit.ai.psg.jevaES.SimpleNode
java.lang.Object
|
+----edu.mit.ai.psg.jevaES.SimpleNode
- public class SimpleNode
- extends Object
- implements Node
Root class for all parse tree nodes.
Contains an array of child nodes.
Amended to contain first and last+1 token of
the parsed syntax, so the syntax can be regenerated.
Additions:
- Author:
- CarlManning, caroma@ai.mit.edu
Copyright (c) 1997 Massachusetts Institute of Technology
-
SimpleNode(int)
-
-
dump(String)
-
-
getBeginToken()
-
-
getEndToken()
-
-
jjtAddChild(Node, int)
-
-
jjtClose()
-
-
jjtGetChild(int)
-
-
jjtGetNumChildren()
-
-
jjtGetParent()
-
-
jjtOpen()
-
-
jjtSetParent(Node)
-
-
print(PrintWriter)
- Print tokens of parsed node's syntax, including children, to stream.
-
print(PrintWriter, boolean)
-
-
printToString()
- Print tokens of parsed node's syntax, including children, to string.
-
printToString(boolean)
-
-
setBeginToken(Token)
- Called by the parser to set the first token of the parsed syntax
-
setEndToken(Token)
- Called by the parser to set the last+1 token of the parsed syntax
-
toString()
-
-
toString(String)
-
SimpleNode
public SimpleNode(int i)
jjtOpen
public void jjtOpen()
jjtClose
public void jjtClose()
jjtSetParent
public void jjtSetParent(Node n)
jjtGetParent
public Node jjtGetParent()
jjtAddChild
public void jjtAddChild(Node n,
int i)
jjtGetChild
public Node jjtGetChild(int i)
jjtGetNumChildren
public int jjtGetNumChildren()
toString
public String toString()
- Overrides:
- toString in class Object
toString
public String toString(String prefix)
dump
public void dump(String prefix)
getBeginToken
public Token getBeginToken()
- Returns:
- the first token (in token chain) of the parsed syntax
getEndToken
public Token getEndToken()
- Returns:
- the token after the last token of the parsed syntax
setBeginToken
public void setBeginToken(Token t)
- Called by the parser to set the first token of the parsed syntax
setEndToken
public void setEndToken(Token t)
- Called by the parser to set the last+1 token of the parsed syntax
print
public void print(PrintWriter stream)
- Print tokens of parsed node's syntax, including children, to stream.
also prints special tokens (whitespace and comments)
print
public void print(PrintWriter stream,
boolean includeSpecialTokens)
printToString
public String printToString()
- Print tokens of parsed node's syntax, including children, to string.
Includes special tokens (whitespace and comments).
- Returns:
- a string recreating node's syntax
printToString
public String printToString(boolean includeSpecialTokens)
All Packages Class Hierarchy This Package Previous Next Index