de.matthias_burbach.util
Class Node

java.lang.Object
  extended byde.matthias_burbach.util.Node

class Node
extends java.lang.Object

Private helper class for Diff. 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
(package private) static int bothonce
           
(package private) static int freshnode
           
(package private)  java.lang.String line
           
(package private)  int linenum
           
(package private)  int linestate
           
(package private) static int newonce
           
(package private) static int oldonce
           
(package private) static int other
           
(package private) static Node panchor
           
(package private)  Node pleft
           
(package private)  Node pright
           
 
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.
(package private) static Node matchsymbol(java.lang.String pline)
          matchsymbol Searches tree for a match to the line.
(package private)  void showSymbol(java.io.PrintWriter printWriter)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pleft

Node pleft

pright

Node pright

linenum

int linenum

freshnode

static final int freshnode
See Also:
Constant Field Values

oldonce

static final int oldonce
See Also:
Constant Field Values

newonce

static final int newonce
See Also:
Constant Field Values

bothonce

static final int bothonce
See Also:
Constant Field Values

other

static final int other
See Also:
Constant Field Values

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.


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.PrintWriter printWriter)
showSymbol Prints the line to stdout.