|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappli.diff.node
Class "node". The symbol table routines in this class all understand the symbol table format, which is a binary tree. The methods are: addSymbol, symbolIsUnique, showSymbol.
Field Summary | |
private static int |
bothonce
|
private static int |
freshnode
|
(package private) java.lang.String |
line
|
(package private) int |
linenum
|
(package private) int |
linestate
|
private static int |
newonce
|
private static int |
oldonce
|
private static int |
other
|
(package private) static node |
panchor
|
(package private) node |
pleft
|
(package private) node |
pright
|
private static java.lang.String[] |
stateName
|
Constructor Summary | |
(package private) |
node(java.lang.String pline)
Construct a new symbol table node and fill in its fields. |
Method Summary | |
(package private) static node |
addSymbol(java.lang.String pline,
boolean inoldfile,
int linenum)
addSymbol(String pline) - Saves line into the symbol table. |
private static int |
compare(java.lang.String str1,
java.lang.String str2)
String comparison function |
(package private) static node |
matchsymbol(java.lang.String pline)
matchsymbol Searches tree for a match to the line. |
private static java.lang.String |
noSpace(java.lang.String str)
Suppress all whitechars in a string |
(package private) void |
showSymbol(java.io.PrintStream prt)
showSymbol Prints the line to stdout. |
(package private) boolean |
symbolIsUnique()
symbolIsUnique Arg is a ptr previously returned by addSymbol. -------------- Returns true if the line was added to the symbol table exactly once with inoldfile true, and exactly once with inoldfile false. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final java.lang.String[] stateName
private static final int freshnode
private static final int oldonce
private static final int newonce
private static final int bothonce
private static final int other
node pleft
node pright
int linenum
int linestate
java.lang.String line
static node panchor
Constructor Detail |
node(java.lang.String pline)
Method Detail |
static node matchsymbol(java.lang.String pline)
private static int compare(java.lang.String str1, java.lang.String str2)
str1
- first string to comparestr2
- second string to compare
private static java.lang.String noSpace(java.lang.String str)
str
- string to treat
static node addSymbol(java.lang.String pline, boolean inoldfile, int linenum)
boolean symbolIsUnique()
void showSymbol(java.io.PrintStream prt)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |