appli.diff
Class node

java.lang.Object
  extended byappli.diff.node

class node
extends java.lang.Object

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

stateName

private static final java.lang.String[] stateName

freshnode

private static final int freshnode
See Also:
Constant Field Values

oldonce

private static final int oldonce
See Also:
Constant Field Values

newonce

private static final int newonce
See Also:
Constant Field Values

bothonce

private static final int bothonce
See Also:
Constant Field Values

other

private static final int other
See Also:
Constant Field Values

pleft

node pleft

pright

node pright

linenum

int linenum

linestate

int linestate

line

java.lang.String line

panchor

static node panchor
Constructor Detail

node

node(java.lang.String pline)
Construct a new symbol table node and fill in its fields.

Method Detail

matchsymbol

static node matchsymbol(java.lang.String pline)
matchsymbol Searches tree for a match to the line.


compare

private static int compare(java.lang.String str1,
                           java.lang.String str2)
String comparison function

Parameters:
str1 - first string to compare
str2 - second string to compare
Returns:

noSpace

private static java.lang.String noSpace(java.lang.String str)
Suppress all whitechars in a string

Parameters:
str - string to treat
Returns:
a string without white chars (space and tabs)

addSymbol

static node addSymbol(java.lang.String pline,
                      boolean inoldfile,
                      int linenum)
addSymbol(String pline) - Saves line into the symbol table. Returns a handle to the symtab entry for that unique line. If inoldfile nonzero, then linenum is remembered.


symbolIsUnique

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.


showSymbol

void showSymbol(java.io.PrintStream prt)
showSymbol Prints the line to stdout.


toString

public java.lang.String toString()