All Packages Class Hierarchy This Package Previous Next Index
Class openjava.ptree.PtreeObject
java.lang.Object
|
+----openjava.ptree.PtreeObject
- public abstract class PtreeObject
- extends Object
- implements Ptree
The Ptree class presents for the node of parse tree.
This may be a token node, Leaf, or may be a nonterminal node, NonLeaf.
- See Also:
- Leaf, NonLeaf
-
debugFlag
- to write debugging code
-
debugLevel
-
-
LN
- Why this modifier is not final ?
- Because of javac bug in excuting it with -O option.
-
out
- this is used as like grobal variable in Ptree class-family.
-
writerStack
- this is used as like grobal variable in Ptree class-family.
-
PtreeObject()
- Arrocates new parse-tree object and set identifier number
on the object.
-
eq(Ptree)
- Tests if this parse-tree-node's value equals to the specified
ptree-node's.
-
eq(Ptree, Ptree)
- Return true if only they refer to the same object.
-
equal(Ptree, Ptree)
- May return true if two ptree-nodes don't refer to not the
same objects but their contents are equivalent.
-
equals(Ptree)
- Tests if this parse-tree-node's value equals to the specified
ptree-node's.
-
flushPrintWriter()
-
-
getDebugFlag()
-
-
getNest()
-
-
getObjectID()
- Returns
-
getPrintWriter()
-
-
getTab()
-
-
makeCopy()
- Makes a new copy of this ptree-node.
-
makeRecursiveCopy()
- Makes a new copy (another object) of this nonleaf-node recursively.
-
popNest()
-
-
popPrintWriter()
-
-
pushNest()
-
-
pushPrintWriter(PrintWriter)
-
-
setDebugFlag(boolean)
-
-
setDebugLevel(int)
-
-
setNest(int)
-
-
setPrintStream(PrintStream)
- Sets the writer to the one from the specified stream.
-
setTab(String)
-
-
toFlattenString()
-
-
toString()
- Generates string which presents for this parse-tree
-
writeCode()
- Writes a source code in the writer(stream).
-
writeDebug(String)
-
-
writeDebugL()
-
-
writeDebugLln()
-
-
writeDebugln()
-
-
writeDebugLR()
-
-
writeDebugR()
-
-
writeDebugRln()
-
-
writeTab()
-
LN
protected static String LN
- Why this modifier is not final ?
- Because of javac bug in excuting it with -O option.
writerStack
protected static WriterStack writerStack
- this is used as like grobal variable in Ptree class-family.
out
protected static PrintWriter out
- this is used as like grobal variable in Ptree class-family.
debugFlag
protected static boolean debugFlag
- to write debugging code
debugLevel
protected static int debugLevel
PtreeObject
public PtreeObject()
- Arrocates new parse-tree object and set identifier number
on the object.
makeCopy
public abstract Ptree makeCopy()
- Makes a new copy of this ptree-node.
- Returns:
- the copy of this ptree-node.
equals
public abstract boolean equals(Ptree p)
- Tests if this parse-tree-node's value equals to the specified
ptree-node's.
- Returns:
- true if two values are same.
eq
public final boolean eq(Ptree p)
- Tests if this parse-tree-node's value equals to the specified
ptree-node's.
- Returns:
- true if two this and p refer to the same ptree object.
toString
public String toString()
- Generates string which presents for this parse-tree
- Returns:
- string which presents for this parse-tree
- Overrides:
- toString in class Object
setPrintStream
public static void setPrintStream(PrintStream pstream)
- Sets the writer to the one from the specified stream.
- Parameters:
- pstrem - print stream
getPrintWriter
public static PrintWriter getPrintWriter()
popPrintWriter
public static PrintWriter popPrintWriter()
pushPrintWriter
public static void pushPrintWriter(PrintWriter pw)
flushPrintWriter
public static void flushPrintWriter()
setDebugFlag
public static void setDebugFlag(boolean df)
setDebugLevel
public static void setDebugLevel(int n)
getDebugFlag
public static boolean getDebugFlag()
setTab
public static void setTab(String str)
getTab
public static String getTab()
setNest
public static void setNest(int i)
getNest
public static int getNest()
pushNest
public static void pushNest()
popNest
public static void popNest()
writeDebugL
protected void writeDebugL()
writeDebugR
protected static void writeDebugR()
writeDebugLR
protected static void writeDebugLR()
writeDebugLln
protected static void writeDebugLln()
writeDebugRln
protected static void writeDebugRln()
writeDebugln
protected static void writeDebugln()
writeDebug
protected static void writeDebug(String str)
writeTab
protected static void writeTab()
writeCode
public abstract void writeCode()
- Writes a source code in the writer(stream).
This must be overridden.
eq
public static final boolean eq(Ptree p,
Ptree q)
- Return true if only they refer to the same object.
- Parameters:
- p - the ptree-node
- q - the ptree-node
- Returns:
- true if p and q refer to same object.
equal
public static final boolean equal(Ptree p,
Ptree q)
- May return true if two ptree-nodes don't refer to not the
same objects but their contents are equivalent.
- Parameters:
- p - the node
- q - the node to compare
- Returns:
- true if p equals c
getObjectID
public final int getObjectID()
- Returns
- Parameters:
- id - ID
- Returns:
- Name the ID represents
toFlattenString
public String toFlattenString()
All Packages Class Hierarchy This Package Previous Next Index