Class ClassTable

java.lang.Object
  extended byClassTable

class ClassTable
extends java.lang.Object

This class may be used to contain the semantic information such as the inheritance graph. You may use it or not as you like: it is only here to provide a container for the supplied methods.


Constructor Summary
ClassTable(Classes cls)
           
 
Method Summary
 boolean errors()
          Returns true if there are any static semantic errors.
static void main(java.lang.String[] args)
           
 java.io.PrintStream semantError()
          Increments semantic error count and returns the print stream for error messages.
 java.io.PrintStream semantError(AbstractSymbol filename, TreeNode t)
          Prints the file name and the line number of the given tree node.
 java.io.PrintStream semantError(class_ c)
          Prints line number and file name of the given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassTable

public ClassTable(Classes cls)
Method Detail

semantError

public java.io.PrintStream semantError(class_ c)
Prints line number and file name of the given class. Also increments semantic error count.

Parameters:
c - the class
Returns:
a print stream to which the rest of the error message is to be printed.

semantError

public java.io.PrintStream semantError(AbstractSymbol filename,
                                       TreeNode t)
Prints the file name and the line number of the given tree node. Also increments semantic error count.

Parameters:
filename - the file name
t - the tree node
Returns:
a print stream to which the rest of the error message is to be printed.

semantError

public java.io.PrintStream semantError()
Increments semantic error count and returns the print stream for error messages.

Returns:
a print stream to which the error message is to be printed.

errors

public boolean errors()
Returns true if there are any static semantic errors.


main

public static void main(java.lang.String[] args)