com.jeffpalm.cop5555.constrainer
Class Constrainer

java.lang.Object
  extended by com.jeffpalm.cop5555.constrainer.Constrainer

public class Constrainer
extends java.lang.Object


Field Summary
protected  ErrorHandler eh
           
protected  java.lang.String file
           
static int GLOBAL
           
static int LOCAL
           
protected  int offset
           
protected  int scope
           
protected  Table table
           
 
Constructor Summary
Constrainer(Parser p)
           
 
Method Summary
 int closeScope()
           
 boolean enter(java.lang.String s, TreeNode t)
           
 boolean enter(TreeNode t)
           
 void error(int line, int col, java.lang.String s)
           
 void error(TreeNode n, java.lang.String s)
           
 void fatal()
           
 int getOffset()
           
 int getScope()
           
 boolean hasErrors()
           
 int incOffset()
           
 boolean isDeclared(java.lang.String s)
           
 boolean isDeclared(TreeNode n)
           
 boolean isUnique(java.lang.String s)
           
 TreeNode lookUp(TreeNode n)
           
 int openScope()
           
 void printErrors()
           
 void setOffset(int _offset)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

table

protected Table table

scope

protected int scope

offset

protected int offset

eh

protected ErrorHandler eh

file

protected java.lang.String file

GLOBAL

public static final int GLOBAL
See Also:
Constant Field Values

LOCAL

public static final int LOCAL
See Also:
Constant Field Values
Constructor Detail

Constrainer

public Constrainer(Parser p)
Method Detail

openScope

public int openScope()

closeScope

public int closeScope()

lookUp

public TreeNode lookUp(TreeNode n)

enter

public boolean enter(java.lang.String s,
                     TreeNode t)

enter

public boolean enter(TreeNode t)

isUnique

public boolean isUnique(java.lang.String s)

isDeclared

public boolean isDeclared(java.lang.String s)

isDeclared

public boolean isDeclared(TreeNode n)

error

public void error(int line,
                  int col,
                  java.lang.String s)

error

public void error(TreeNode n,
                  java.lang.String s)

printErrors

public void printErrors()

setOffset

public void setOffset(int _offset)

getOffset

public int getOffset()

incOffset

public int incOffset()

getScope

public int getScope()

hasErrors

public boolean hasErrors()

fatal

public void fatal()