|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--antlr.BaseAST
|
+--antlr.CommonAST
|
+--junc.ast.JUnCASTNode
|
+--junc.ast.CompilationUnitNode
Represents a Compilation Unit (one java source file).
| Field Summary | |
java.util.Vector |
imports
A Symbol vector with all the import declarations defined in this module. |
junc.symtab.Symbol |
packageName
The name of the package to which the compilation unit belongs to. |
java.util.Vector |
types
A vector of type declarations (classes or interfaces) defined in this module. |
| Fields inherited from class antlr.BaseAST |
down, right |
| Constructor Summary | |
CompilationUnitNode()
Creates a new CompilationUnitNode instance. |
|
| Method Summary | |
void |
addImport(junc.symtab.Symbol imp)
Add an import symbol. |
void |
translate()
Generates byte code for this unit. |
junc.types.JUnCBaseType |
typeCheck(junc.symtab.SymbolTable symbolTable)
Checks type for each class/interface definition in this unit. |
| Methods inherited from class junc.ast.JUnCASTNode |
getColumnNumber, getLineNumber, setColumnNumber, setLineNumber |
| Methods inherited from class antlr.CommonAST |
getText, getType, initialize, initialize, initialize, setText, setType |
| Methods inherited from class antlr.BaseAST |
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public junc.symtab.Symbol packageName
public java.util.Vector imports
public java.util.Vector types
| Constructor Detail |
public CompilationUnitNode()
CompilationUnitNode instance.
| Method Detail |
public junc.types.JUnCBaseType typeCheck(junc.symtab.SymbolTable symbolTable)
throws TypeCheckError
typeCheck in class JUnCASTNodesymbolTable - a SymbolTable value
JUnCBaseType value
TypeCheckError - if an error occurspublic void translate()
public void addImport(junc.symtab.Symbol imp)
imp - a Symbol value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||