A B C D E F G H I J L M N O P R S T U V W Z

A

A1 - Static variable in class CgenSupport
 
ACC - Static variable in class CgenSupport
 
ADD - Static variable in class CgenSupport
 
ADDI - Static variable in class CgenSupport
 
ADDIU - Static variable in class CgenSupport
 
ADDU - Static variable in class CgenSupport
 
ALIGN - Static variable in class CgenSupport
 
AbstractSymbol - class AbstractSymbol.
String table entry There are three kinds of string table entries: a true string, a string representation of an identifier, and a string representation of an integer.
AbstractSymbol(String, int, int) - Constructor for class AbstractSymbol
Constructs a new table entry.
AbstractTable - class AbstractTable.
Abstract string table implementation.
AbstractTable() - Constructor for class AbstractTable
 
actual - Variable in class dispatch
 
actual - Variable in class static_dispatch
 
addChild(CgenNode) - Method in class CgenNode
 
addElement(TreeNode) - Method in class ListNode
Appends an element to the list.
addId(AbstractSymbol, Object) - Method in class SymbolTable
Adds a new entry to the symbol table.
addInt(int) - Method in class AbstractTable
Adds the string representation of the specified integer to this string table
addString(String, int) - Method in class AbstractTable
Adds prefix of the specified length to this string table
addString(String) - Method in class AbstractTable
Adds the specified string to this string table
appendElement(TreeNode) - Method in class Cases
Appends "Case" element to this list
appendElement(TreeNode) - Method in class Classes
Appends "Class_" element to this list
appendElement(TreeNode) - Method in class Expressions
Appends "Expression" element to this list
appendElement(TreeNode) - Method in class Features
Appends "Feature" element to this list
appendElement(TreeNode) - Method in class Formals
Appends "Formal" element to this list
arg - Static variable in class TreeConstants
 
arg2 - Static variable in class TreeConstants
 
asciiMode(PrintStream) - Static method in class CgenSupport
Switch output mode to ASCII.
assign - class assign.
Defines AST constructor 'assign'.
assign(int, AbstractSymbol, Expression) - Constructor for class assign
Creates "assign" AST node.
attr - class attr.
Defines AST constructor 'attr'.
attr(int, AbstractSymbol, AbstractSymbol, Expression) - Constructor for class attr
Creates "attr" AST node.

B

BEQ - Static variable in class CgenSupport
 
BEQZ - Static variable in class CgenSupport
 
BGT - Static variable in class CgenSupport
 
BLEQ - Static variable in class CgenSupport
 
BLT - Static variable in class CgenSupport
 
BNE - Static variable in class CgenSupport
 
BOOLCONST_PREFIX - Static variable in class CgenSupport
 
BOOLTAG - Static variable in class CgenSupport
 
BOOL_SLOTS - Static variable in class CgenSupport
 
BRANCH - Static variable in class CgenSupport
 
Basic - Static variable in class CgenNode
Indicates a basic class
Bool - Static variable in class TreeConstants
 
BoolConst - class BoolConst.
This clas encapsulates all aspects of code generation for boolean constatns.
BoolConst(boolean) - Constructor for class BoolConst
Creates a new boolean constant.
BoolConst(Boolean) - Constructor for class BoolConst
Creates a new boolean constant.
basic() - Method in class CgenNode
Returns true is this is a basic class.
block - class block.
Defines AST constructor 'block'.
block(int, Expressions) - Constructor for class block
Creates "block" AST node.
body - Variable in class block
 
body - Variable in class let
 
body - Variable in class loop
 
bool_const - class bool_const.
Defines AST constructor 'bool_const'.
bool_const(int, Boolean) - Constructor for class bool_const
Creates "bool_const" AST node.
branch - class branch.
Defines AST constructor 'branch'.
branch(int, AbstractSymbol, AbstractSymbol, Expression) - Constructor for class branch
Creates "branch" AST node.
buf - Variable in class CoolTokenLexer
 
byteMode(PrintStream) - Static method in class CgenSupport
Switch output mode to BYTE

C

CLASSINIT_SUFFIX - Static variable in class CgenSupport
 
CLASSNAMETAB - Static variable in class CgenSupport
 
CLASSOBJTAB - Static variable in class CgenSupport
 
Case - class Case.
Defines simple phylum Case
Case(int) - Constructor for class Case
 
Cases - class Cases.
Defines list phylum Cases
Cases(int, Vector) - Constructor for class Cases
 
Cases(int) - Constructor for class Cases
Creates an empty "Cases" list
CgenClassTable - class CgenClassTable.
This class is used for representing the inheritance tree during code generation.
CgenClassTable(Classes, PrintStream) - Constructor for class CgenClassTable
Constructs a new class table and invokes the code generator
CgenNode - class CgenNode.
 
CgenNode(Class_, int, CgenClassTable) - Constructor for class CgenNode
Constructs a new CgenNode to represent class "c".
CgenSupport - class CgenSupport.
This class aggregates all kinds of support routines and constants for the code generator; all routines are statics, so no instance of this class is even created.
CgenSupport() - Constructor for class CgenSupport
 
ClassTable - class ClassTable.
This class may be used to contain the semantic information such as the inheritance graph.
ClassTable(Classes) - Constructor for class ClassTable
 
Class_ - class Class_.
Defines simple phylum Class_
Class_(int) - Constructor for class Class_
 
Classes - class Classes.
Defines list phylum Classes
Classes(int, Vector) - Constructor for class Classes
 
Classes(int) - Constructor for class Classes
Creates an empty "Classes" list
CoolTokenLexer - class CoolTokenLexer.
 
CoolTokenLexer(Reader) - Constructor for class CoolTokenLexer
 
CoolTokenLexer(InputStream) - Constructor for class CoolTokenLexer
 
cases - Variable in class typcase
 
cgen(PrintStream) - Method in class Program
 
cgen(PrintStream) - Method in class program
This method is the entry point to the code generator.
cgen_Memmgr - Static variable in class Flags
Garbage collector flag (default GC_NOGC)
cgen_Memmgr_Debug - Static variable in class Flags
Garbage collector debugging flag (default GC_QUICK)
cgen_Memmgr_Test - Static variable in class Flags
Garbage collector testing flag (default GC_NORMAL)
cgen_debug - Static variable in class Flags
Enable code gen debugging
cgen_optimize - Static variable in class Flags
Code optimization flag
class_ - class class_.
Defines AST constructor 'class_'.
class_(int, AbstractSymbol, AbstractSymbol, Features, AbstractSymbol) - Constructor for class class_
Creates "class_" AST node.
classes - Variable in class program
 
clone() - Method in class AbstractSymbol
Returns a copy of this symbol
clone() - Method in class IdSymbol
Returns a copy of this symbol
clone() - Method in class IntSymbol
Returns a copy of this symbol
clone() - Method in class StringSymbol
Returns a copy of this symbol
code() - Method in class CgenClassTable
This method is the meat of the code generator.
code(PrintStream) - Method in class Expression
 
code(PrintStream) - Method in class assign
Generates code for this expression.
code(PrintStream) - Method in class block
Generates code for this expression.
code(PrintStream) - Method in class bool_const
Generates code for this expression.
code(PrintStream) - Method in class comp
Generates code for this expression.
code(PrintStream) - Method in class cond
Generates code for this expression.
code(PrintStream) - Method in class dispatch
Generates code for this expression.
code(PrintStream) - Method in class divide
Generates code for this expression.
code(PrintStream) - Method in class eq
Generates code for this expression.
code(PrintStream) - Method in class int_const
Generates code for this expression.
code(PrintStream) - Method in class isvoid
Generates code for this expression.
code(PrintStream) - Method in class leq
Generates code for this expression.
code(PrintStream) - Method in class let
Generates code for this expression.
code(PrintStream) - Method in class loop
Generates code for this expression.
code(PrintStream) - Method in class lt
Generates code for this expression.
code(PrintStream) - Method in class mul
Generates code for this expression.
code(PrintStream) - Method in class neg
Generates code for this expression.
code(PrintStream) - Method in class new_
Generates code for this expression.
code(PrintStream) - Method in class no_expr
Generates code for this expression.
code(PrintStream) - Method in class object
Generates code for this expression.
code(PrintStream) - Method in class plus
Generates code for this expression.
code(PrintStream) - Method in class static_dispatch
Generates code for this expression.
code(PrintStream) - Method in class string_const
Generates code for this expression.
code(PrintStream) - Method in class sub
Generates code for this expression.
code(PrintStream) - Method in class typcase
Generates code for this expression.
codeDef(int, PrintStream) - Method in class BoolConst
Generates code for the boolean constant definition.
codeDef(int, PrintStream) - Method in class IntSymbol
Generates code for the integer constant definition.
codeDef(int, PrintStream) - Method in class StringSymbol
Generates code for the string constant definition.
codeRef(PrintStream) - Method in class BoolConst
Emits a reference to this boolean constant.
codeRef(PrintStream) - Method in class IntSymbol
Emits a reference to this integer constant.
codeRef(PrintStream) - Method in class StringSymbol
Emits a reference to this string constant.
codeStringTable(int, PrintStream) - Method in class IntTable
Generates code for all int constants in the int table.
codeStringTable(int, PrintStream) - Method in class StringTable
Generates code for all string constants in the string table.
comp - class comp.
Defines AST constructor 'comp'.
comp(int, Expression) - Constructor for class comp
Creates "comp" AST node.
concat - Static variable in class TreeConstants
 
cond - class cond.
Defines AST constructor 'cond'.
cond(int, Expression, Expression, Expression) - Constructor for class cond
Creates "cond" AST node.
cool_abort - Static variable in class TreeConstants
 
copy() - Method in class Cases
 
copy() - Method in class Classes
 
copy() - Method in class Expressions
 
copy() - Method in class Features
 
copy() - Method in class Formals
 
copy - Static variable in class TreeConstants
 
copy() - Method in class TreeNode
Creates a copy of this node.
copy() - Method in class assign
 
copy() - Method in class attr
 
copy() - Method in class block
 
copy() - Method in class bool_const
 
copy() - Method in class branch
 
copy() - Method in class class_
 
copy() - Method in class comp
 
copy() - Method in class cond
 
copy() - Method in class dispatch
 
copy() - Method in class divide
 
copy() - Method in class eq
 
copy() - Method in class formal
 
copy() - Method in class int_const
 
copy() - Method in class isvoid
 
copy() - Method in class leq
 
copy() - Method in class let
 
copy() - Method in class loop
 
copy() - Method in class lt
 
copy() - Method in class method
 
copy() - Method in class mul
 
copy() - Method in class neg
 
copy() - Method in class new_
 
copy() - Method in class no_expr
 
copy() - Method in class object
 
copy() - Method in class plus
 
copy() - Method in class program
 
copy() - Method in class static_dispatch
 
copy() - Method in class string_const
 
copy() - Method in class sub
 
copy() - Method in class typcase
 
copyElements() - Method in class ListNode
Creates a deep copy of this list.
copy_AbstractSymbol(AbstractSymbol) - Method in class TreeNode
Copies an AbstractSymbol value.
copy_Boolean(Boolean) - Method in class TreeNode
Copies a boolean value.
curr_filename() - Method in class CoolTokenLexer
 
curr_lineno() - Method in class CoolTokenLexer
 

D

DEFAULT_OBJFIELDS - Static variable in class CgenSupport
 
DISPTABLE_OFFSET - Static variable in class CgenSupport
 
DISPTAB_SUFFIX - Static variable in class CgenSupport
 
DIV - Static variable in class CgenSupport
 
deepCopy() - Method in class SymbolTable
Returns a clone of the symbol table (ECL).
dispatch - class dispatch.
Defines AST constructor 'dispatch'.
dispatch(int, Expression, AbstractSymbol, Expressions) - Constructor for class dispatch
Creates "dispatch" AST node.
divide - class divide.
Defines AST constructor 'divide'.
divide(int, Expression, Expression) - Constructor for class divide
Creates "divide" AST node.
dump(PrintStream, int) - Method in class ListNode
Pretty-prints this list to this output stream.
dump(PrintStream, int) - Method in class TreeNode
Pretty-prints this node to this output stream.
dump(PrintStream, int) - Method in class assign
 
dump(PrintStream, int) - Method in class attr
 
dump(PrintStream, int) - Method in class block
 
dump(PrintStream, int) - Method in class bool_const
 
dump(PrintStream, int) - Method in class branch
 
dump(PrintStream, int) - Method in class class_
 
dump(PrintStream, int) - Method in class comp
 
dump(PrintStream, int) - Method in class cond
 
dump(PrintStream, int) - Method in class dispatch
 
dump(PrintStream, int) - Method in class divide
 
dump(PrintStream, int) - Method in class eq
 
dump(PrintStream, int) - Method in class formal
 
dump(PrintStream, int) - Method in class int_const
 
dump(PrintStream, int) - Method in class isvoid
 
dump(PrintStream, int) - Method in class leq
 
dump(PrintStream, int) - Method in class let
 
dump(PrintStream, int) - Method in class loop
 
dump(PrintStream, int) - Method in class lt
 
dump(PrintStream, int) - Method in class method
 
dump(PrintStream, int) - Method in class mul
 
dump(PrintStream, int) - Method in class neg
 
dump(PrintStream, int) - Method in class new_
 
dump(PrintStream, int) - Method in class no_expr
 
dump(PrintStream, int) - Method in class object
 
dump(PrintStream, int) - Method in class plus
 
dump(PrintStream, int) - Method in class program
 
dump(PrintStream, int) - Method in class static_dispatch
 
dump(PrintStream, int) - Method in class string_const
 
dump(PrintStream, int) - Method in class sub
 
dump(PrintStream, int) - Method in class typcase
 
dumpToken(PrintStream, int, Symbol) - Static method in class Utilities
Dumps a token to the specified stream
dump_AbstractSymbol(PrintStream, int, AbstractSymbol) - Method in class TreeNode
Dumps a printable representation of an AbstactSymbol value.
dump_Boolean(PrintStream, int, Boolean) - Method in class TreeNode
Dumps a printable representation of a boolean value.
dump_line(PrintStream, int) - Method in class TreeNode
Dumps a printable representation of current line number This method is used internally by the generated AST classes
dump_type(PrintStream, int) - Method in class Expression
 
dump_with_types(PrintStream, int) - Method in class Case
 
dump_with_types(PrintStream, int) - Method in class Class_
 
dump_with_types(PrintStream, int) - Method in class Expression
 
dump_with_types(PrintStream, int) - Method in class Feature
 
dump_with_types(PrintStream, int) - Method in class Formal
 
dump_with_types(PrintStream, int) - Method in class Program
 
dump_with_types(PrintStream, int) - Method in class assign
 
dump_with_types(PrintStream, int) - Method in class attr
 
dump_with_types(PrintStream, int) - Method in class block
 
dump_with_types(PrintStream, int) - Method in class bool_const
 
dump_with_types(PrintStream, int) - Method in class branch
 
dump_with_types(PrintStream, int) - Method in class class_
 
dump_with_types(PrintStream, int) - Method in class comp
 
dump_with_types(PrintStream, int) - Method in class cond
 
dump_with_types(PrintStream, int) - Method in class dispatch
 
dump_with_types(PrintStream, int) - Method in class divide
 
dump_with_types(PrintStream, int) - Method in class eq
 
dump_with_types(PrintStream, int) - Method in class formal
 
dump_with_types(PrintStream, int) - Method in class int_const
 
dump_with_types(PrintStream, int) - Method in class isvoid
 
dump_with_types(PrintStream, int) - Method in class leq
 
dump_with_types(PrintStream, int) - Method in class let
 
dump_with_types(PrintStream, int) - Method in class loop
 
dump_with_types(PrintStream, int) - Method in class lt
 
dump_with_types(PrintStream, int) - Method in class method
 
dump_with_types(PrintStream, int) - Method in class mul
 
dump_with_types(PrintStream, int) - Method in class neg
 
dump_with_types(PrintStream, int) - Method in class new_
 
dump_with_types(PrintStream, int) - Method in class no_expr
 
dump_with_types(PrintStream, int) - Method in class object
 
dump_with_types(PrintStream, int) - Method in class plus
 
dump_with_types(PrintStream, int) - Method in class program
 
dump_with_types(PrintStream, int) - Method in class static_dispatch
 
dump_with_types(PrintStream, int) - Method in class string_const
 
dump_with_types(PrintStream, int) - Method in class sub
 
dump_with_types(PrintStream, int) - Method in class typcase
 

E

EMPTYSLOT - Static variable in class CgenSupport
 
Expression - class Expression.
Defines simple phylum Expression
Expression(int) - Constructor for class Expression
 
Expressions - class Expressions.
Defines list phylum Expressions
Expressions(int, Vector) - Constructor for class Expressions
 
Expressions(int) - Constructor for class Expressions
Creates an empty "Expressions" list
e1 - Variable in class comp
 
e1 - Variable in class divide
 
e1 - Variable in class eq
 
e1 - Variable in class isvoid
 
e1 - Variable in class leq
 
e1 - Variable in class lt
 
e1 - Variable in class mul
 
e1 - Variable in class neg
 
e1 - Variable in class plus
 
e1 - Variable in class sub
 
e2 - Variable in class divide
 
e2 - Variable in class eq
 
e2 - Variable in class leq
 
e2 - Variable in class lt
 
e2 - Variable in class mul
 
e2 - Variable in class plus
 
e2 - Variable in class sub
 
elementClass - Static variable in class Cases
 
elementClass - Static variable in class Classes
 
elementClass - Static variable in class Expressions
 
elementClass - Static variable in class Features
 
elementClass - Static variable in class Formals
 
else_exp - Variable in class cond
 
emitAdd(String, String, String, PrintStream) - Static method in class CgenSupport
Emits an ADD instruction.
emitAddiu(String, String, int, PrintStream) - Static method in class CgenSupport
Emits an ADDIU instruction.
emitAddu(String, String, String, PrintStream) - Static method in class CgenSupport
Emits an ADDU instruction.
emitBeq(String, String, int, PrintStream) - Static method in class CgenSupport
Emits a BEQ instruction.
emitBeqz(String, int, PrintStream) - Static method in class CgenSupport
Emits a BEQZ instruction.
emitBgti(String, int, int, PrintStream) - Static method in class CgenSupport
Emits a BGTI instruction.
emitBleq(String, String, int, PrintStream) - Static method in class CgenSupport
Emits a BLEQ instruction.
emitBlt(String, String, int, PrintStream) - Static method in class CgenSupport
Emits a BLT instruction.
emitBlti(String, int, int, PrintStream) - Static method in class CgenSupport
Emits a BLTI instruction.
emitBne(String, String, int, PrintStream) - Static method in class CgenSupport
Emits a BNE instruction.
emitBranch(int, PrintStream) - Static method in class CgenSupport
Emits a BRANCH instruction.
emitDispTableRef(AbstractSymbol, PrintStream) - Static method in class CgenSupport
Emits a reference to dispatch table.
emitDiv(String, String, String, PrintStream) - Static method in class CgenSupport
Emits a DIV instruction.
emitFetchInt(String, String, PrintStream) - Static method in class CgenSupport
Emits code to fetch the integer value of the Integer object.
emitGCAssign(PrintStream) - Static method in class CgenSupport
Emits a call to gc_assign.
emitGCCheck(String, PrintStream) - Static method in class CgenSupport
Emits code to check the garbage collector
emitInitRef(AbstractSymbol, PrintStream) - Static method in class CgenSupport
Emits a reference to class' init() method.
emitJal(String, PrintStream) - Static method in class CgenSupport
Emits a JAL instruction.
emitJalr(String, PrintStream) - Static method in class CgenSupport
Emits a JALR instruction.
emitLabelDef(int, PrintStream) - Static method in class CgenSupport
Emits a definition of a label
emitLabelRef(int, PrintStream) - Static method in class CgenSupport
Emits a reference to a label
emitLoad(String, int, String, PrintStream) - Static method in class CgenSupport
Emits an LW instruction.
emitLoadAddress(String, String, PrintStream) - Static method in class CgenSupport
Emits an LA instruction.
emitLoadBool(String, BoolConst, PrintStream) - Static method in class CgenSupport
Emits an instruction to load a boolean constant into a register.
emitLoadImm(String, int, PrintStream) - Static method in class CgenSupport
Emits the LI instruction.
emitLoadInt(String, IntSymbol, PrintStream) - Static method in class CgenSupport
Emits an instruction to load an integer constant into a register.
emitLoadString(String, StringSymbol, PrintStream) - Static method in class CgenSupport
Emits an instruction to load a string constant into a register.
emitMethodRef(AbstractSymbol, AbstractSymbol, PrintStream) - Static method in class CgenSupport
Emits a reference to a method in a class
emitMove(String, String, PrintStream) - Static method in class CgenSupport
Emits a MOVE instruction.
emitMul(String, String, String, PrintStream) - Static method in class CgenSupport
Emits a MUL instruction.
emitNeg(String, String, PrintStream) - Static method in class CgenSupport
Emits a NEG instruction.
emitPartialLoadAddress(String, PrintStream) - Static method in class CgenSupport
Emits an LA instruction without the address part.
emitProtObjRef(AbstractSymbol, PrintStream) - Static method in class CgenSupport
Emits a reference to class' prototype object.
emitPush(String, PrintStream) - Static method in class CgenSupport
Emit a sequence of instructions to push a register onto stack.
emitReturn(PrintStream) - Static method in class CgenSupport
Emits a RET instruction.
emitSll(String, String, int, PrintStream) - Static method in class CgenSupport
Emits an SLL instruction.
emitStore(String, int, String, PrintStream) - Static method in class CgenSupport
Emits an SW instruction.
emitStoreInt(String, String, PrintStream) - Static method in class CgenSupport
Emits code to store the integer value of the Integer object.
emitStringConstant(String, PrintStream) - Static method in class CgenSupport
Emits a string constant.
emitSub(String, String, String, PrintStream) - Static method in class CgenSupport
Emits a SUB instruction.
emitTestCollector(PrintStream) - Static method in class CgenSupport
Emits code to manipulate garbage collector
enterScope() - Method in class SymbolTable
Enters a new scope.
eq - class eq.
Defines AST constructor 'eq'.
eq(int, Expression, Expression) - Constructor for class eq
Creates "eq" AST node.
equalString(String, int) - Method in class AbstractSymbol
Tests if the string argument is equal to the string in this symbol.
equals(Object) - Method in class AbstractSymbol
Tests if two symbols are equal.
equalsIndex(int) - Method in class AbstractSymbol
Tests if the index argument is equal to the index of this symbol.
errors() - Method in class ClassTable
Returns true if there are any static semantic errors.
exitScope() - Method in class SymbolTable
Exits the most recently entered scope.
expr - Variable in class assign
 
expr - Variable in class branch
 
expr - Variable in class dispatch
 
expr - Variable in class method
 
expr - Variable in class static_dispatch
 
expr - Variable in class typcase
 

F

FP - Static variable in class CgenSupport
 
Feature - class Feature.
Defines simple phylum Feature
Feature(int) - Constructor for class Feature
 
Features - class Features.
Defines list phylum Features
Features(int, Vector) - Constructor for class Features
 
Features(int) - Constructor for class Features
Creates an empty "Features" list
Flags - class Flags.
Command line flags
Flags() - Constructor for class Flags
 
Formal - class Formal.
Defines simple phylum Formal
Formal(int) - Constructor for class Formal
 
Formals - class Formals.
Defines list phylum Formals
Formals(int, Vector) - Constructor for class Formals
 
Formals(int) - Constructor for class Formals
Creates an empty "Formals" list
falsebool - Static variable in class BoolConst
 
fatalError(String) - Static method in class Utilities
Prints error message and exits
features - Variable in class class_
 
filename - Variable in class class_
 
formal - class formal.
Defines AST constructor 'formal'.
formal(int, AbstractSymbol, AbstractSymbol) - Constructor for class formal
Creates "formal" AST node.
formals - Variable in class method
 

G

GC_DEBUG - Static variable in class Flags
Full GC debugging
GC_GENGC - Static variable in class Flags
Generational garbage collection
GC_NOGC - Static variable in class Flags
No garbage collection
GC_NORMAL - Static variable in class Flags
Normal GC operation
GC_QUICK - Static variable in class Flags
Quick GC debugging
GC_SNCGC - Static variable in class Flags
Stop-and-copy garbage collection
GC_TEST - Static variable in class Flags
Test GC operation
GLOBAL - Static variable in class CgenSupport
 
gcCollectNames - Static variable in class CgenSupport
Runtime constants for controlling the garbage collector.
gcInitNames - Static variable in class CgenSupport
Runtime constants for controlling the garbage collector.
getChildren() - Method in class CgenNode
Gets the children of this class
getElementClass() - Method in class Cases
Returns class of this lists's elements
getElementClass() - Method in class Classes
Returns class of this lists's elements
getElementClass() - Method in class Expressions
Returns class of this lists's elements
getElementClass() - Method in class Features
Returns class of this lists's elements
getElementClass() - Method in class Formals
Returns class of this lists's elements
getElementClass() - Method in class ListNode
Returns the class of list elements.
getElements() - Method in class ListNode
Retreives the elements of the list as Enumeration.
getFeatures() - Method in class Class_
 
getFeatures() - Method in class class_
 
getFilename() - Method in class Class_
 
getFilename() - Method in class class_
 
getLength() - Method in class ListNode
Retreives the length of the list.
getLineNumber() - Method in class TreeNode
Retreives the line number from which this node came.
getName() - Method in class Class_
 
getName() - Method in class class_
 
getNewSymbol(String, int, int) - Method in class AbstractTable
Creates a new symbol of the appropriate type
getNewSymbol(String, int, int) - Method in class IdTable
Creates a new IdSymbol object.
getNewSymbol(String, int, int) - Method in class IntTable
Creates a new IntSymbol object.
getNewSymbol(String, int, int) - Method in class StringTable
Creates a new StringSymbol object.
getNth(int) - Method in class ListNode
Retreives nth element of the list.
getParent() - Method in class Class_
 
getParent() - Method in class class_
 
getParentNd() - Method in class CgenNode
Gets the parent of this class
getString() - Method in class AbstractSymbol
Returns the string representation of this symbol.
getSymbols() - Method in class AbstractTable
Returns an enumeration of symbols in this string table
get_type() - Method in class Expression
 

H

HEAP_START - Static variable in class CgenSupport
 
handleFlags(String[]) - Static method in class Flags
Processes command line flags and extracts filenames to be compiled

I

INTCONST_PREFIX - Static variable in class CgenSupport
 
INTTAG - Static variable in class CgenSupport
 
INT_SLOTS - Static variable in class CgenSupport
 
IO - Static variable in class TreeConstants
 
IdSymbol - class IdSymbol.
String table entry for identifiers.
IdSymbol(String, int, int) - Constructor for class IdSymbol
 
IdTable - class IdTable.
 
IdTable() - Constructor for class IdTable
 
Int - Static variable in class TreeConstants
 
IntSymbol - class IntSymbol.
String table entry for integer constants
IntSymbol(String, int, int) - Constructor for class IntSymbol
 
IntTable - class IntTable.
 
IntTable() - Constructor for class IntTable
 
identifier - Variable in class let
 
idtable - Static variable in class AbstractTable
Global string table of identifiers
in_filename - Static variable in class Flags
First input filename
in_int - Static variable in class TreeConstants
 
in_string - Static variable in class TreeConstants
 
index - Variable in class AbstractSymbol
The index of this entry in the string table
init - Variable in class attr
 
init - Variable in class let
 
int_const - class int_const.
Defines AST constructor 'int_const'.
int_const(int, AbstractSymbol) - Constructor for class int_const
Creates "int_const" AST node.
inttable - Static variable in class AbstractTable
Global string table of integer constants
isvoid - class isvoid.
Defines AST constructor 'isvoid'.
isvoid(int, Expression) - Constructor for class isvoid
Creates "isvoid" AST node.

J

JAL - Static variable in class CgenSupport
 
JALR - Static variable in class CgenSupport
 

L

LA - Static variable in class CgenSupport
 
LABEL - Static variable in class CgenSupport
 
LI - Static variable in class CgenSupport
 
LOG_WORD_SIZE - Static variable in class CgenSupport
 
LW - Static variable in class CgenSupport
 
ListNode - class ListNode.
Base class for lists of AST elements.
ListNode(int, Vector) - Constructor for class ListNode
 
ListNode(int) - Constructor for class ListNode
Builds a new list node
length - Static variable in class TreeConstants
 
leq - class leq.
Defines AST constructor 'leq'.
leq(int, Expression, Expression) - Constructor for class leq
Creates "leq" AST node.
let - class let.
Defines AST constructor 'let'.
let(int, AbstractSymbol, AbstractSymbol, Expression, Expression) - Constructor for class let
Creates "let" AST node.
line - Variable in class CoolTokenLexer
 
lineNumber - Variable in class TreeNode
line in the source file from which this node came.
lookup(int) - Method in class AbstractTable
Looks up a symbol in this string table by its index A fatal error is signalled if the index is out of bounds.
lookup(String) - Method in class AbstractTable
Looks up a symbol in this string table by its string representation A fatal error is signalled if the string is not in the table
lookup(AbstractSymbol) - Method in class SymbolTable
Looks up an item through all scopes of the symbol table.
loop - class loop.
Defines AST constructor 'loop'.
loop(int, Expression, Expression) - Constructor for class loop
Creates "loop" AST node.
lt - class lt.
Defines AST constructor 'lt'.
lt(int, Expression, Expression) - Constructor for class lt
Creates "lt" AST node.

M

MAXINT - Static variable in class CgenSupport
 
METHOD_SEP - Static variable in class CgenSupport
 
MOVE - Static variable in class CgenSupport
 
MUL - Static variable in class CgenSupport
 
Main - Static variable in class TreeConstants
 
main(String[]) - Static method in class ClassTable
 
main(String[]) - Static method in class Parser
Reads lexed tokens from consosle, and outputs the parse tree
main_meth - Static variable in class TreeConstants
 
method - class method.
Defines AST constructor 'method'.
method(int, AbstractSymbol, Formals, AbstractSymbol, Expression) - Constructor for class method
Creates "method" AST node.
mul - class mul.
Defines AST constructor 'mul'.
mul(int, Expression, Expression) - Constructor for class mul
Creates "mul" AST node.

N

NEG - Static variable in class CgenSupport
 
No_class - Static variable in class TreeConstants
 
No_type - Static variable in class TreeConstants
 
NotBasic - Static variable in class CgenNode
Indicates a class that came from a Cool program
name - Variable in class assign
 
name - Variable in class attr
 
name - Variable in class branch
 
name - Variable in class class_
 
name - Variable in class dispatch
 
name - Variable in class formal
 
name - Variable in class method
 
name - Variable in class object
 
name - Variable in class static_dispatch
 
neg - class neg.
Defines AST constructor 'neg'.
neg(int, Expression) - Constructor for class neg
Creates "neg" AST node.
new_ - class new_.
Defines AST constructor 'new_'.
new_(int, AbstractSymbol) - Constructor for class new_
Creates "new_" AST node.
next_token() - Method in class CoolTokenLexer
 
no_expr - class no_expr.
Defines AST constructor 'no_expr'.
no_expr(int) - Constructor for class no_expr
Creates "no_expr" AST node.

O

OBJECTPROTOBJ - Static variable in class CgenSupport
 
Object_ - Static variable in class TreeConstants
 
object - class object.
Defines AST constructor 'object'.
object(int, AbstractSymbol) - Constructor for class object
Creates "object" AST node.
out_filename - Static variable in class Flags
Output filename
out_int - Static variable in class TreeConstants
 
out_string - Static variable in class TreeConstants
 

P

PROTOBJ_SUFFIX - Static variable in class CgenSupport
 
Parser - class Parser.
The parser driver class
Parser() - Constructor for class Parser
 
Program - class Program.
Defines simple phylum Program
Program(int) - Constructor for class Program
 
pad(int) - Static method in class Utilities
Returns the specified amount of space padding
parent - Variable in class class_
 
parser_debug - Static variable in class Flags
Enable parser debugging
plus - class plus.
Defines AST constructor 'plus'.
plus(int, Expression, Expression) - Constructor for class plus
Creates "plus" AST node.
pred - Variable in class cond
 
pred - Variable in class loop
 
prevstate - Variable in class CoolTokenLexer
 
prim_slot - Static variable in class TreeConstants
 
printEscapedString(PrintStream, String) - Static method in class Utilities
Prints an appropritely escaped string
printToken(Symbol) - Static method in class Utilities
Prints a token to stderr
probe(AbstractSymbol) - Method in class SymbolTable
Probes the symbol table.
program - class program.
Defines AST constructor 'program'.
program(int, Classes) - Constructor for class program
Creates "program" AST node.

R

RA - Static variable in class CgenSupport
 
RET - Static variable in class CgenSupport
 
return_type - Variable in class method
 
root() - Method in class CgenClassTable
Gets the root of the inheritance tree

S

SELF - Static variable in class CgenSupport
 
SELF_TYPE - Static variable in class TreeConstants
 
SIZE_OFFSET - Static variable in class CgenSupport
 
SLL - Static variable in class CgenSupport
 
SP - Static variable in class CgenSupport
 
STRCONST_PREFIX - Static variable in class CgenSupport
 
STRINGTAG - Static variable in class CgenSupport
 
STRING_SLOTS - Static variable in class CgenSupport
 
SUB - Static variable in class CgenSupport
 
SW - Static variable in class CgenSupport
 
Str - Static variable in class TreeConstants
 
StringSymbol - class StringSymbol.
String table entry for string constants.
StringSymbol(String, int, int) - Constructor for class StringSymbol
 
StringTable - class StringTable.
 
StringTable() - Constructor for class StringTable
 
SymbolTable - class SymbolTable.
Implements the symbol table data abstraction.
SymbolTable() - Constructor for class SymbolTable
Creates an empty symbol table.
self - Static variable in class TreeConstants
 
semant() - Method in class Program
 
semant() - Method in class program
This method is the entry point to the semantic checker.
semantError(class_) - Method in class ClassTable
Prints line number and file name of the given class.
semantError(AbstractSymbol, TreeNode) - Method in class ClassTable
Prints the file name and the line number of the given tree node.
semantError() - Method in class ClassTable
Increments semantic error count and returns the print stream for error messages.
semant_debug - Static variable in class Flags
Enable semantic analysis debugging
set(TreeNode) - Method in class TreeNode
Sets the values of this node object to the values of a given node.
setParentNd(CgenNode) - Method in class CgenNode
Sets the parent of this class.
set_type(AbstractSymbol) - Method in class Expression
 
static_dispatch - class static_dispatch.
Defines AST constructor 'static_dispatch'.
static_dispatch(int, Expression, AbstractSymbol, AbstractSymbol, Expressions) - Constructor for class static_dispatch
Creates "static_dispatch" AST node.
str - Variable in class AbstractSymbol
The stored string
str_field - Static variable in class TreeConstants
 
string_const - class string_const.
Defines AST constructor 'string_const'.
string_const(int, AbstractSymbol) - Constructor for class string_const
Creates "string_const" AST node.
stringtable - Static variable in class AbstractTable
Global string table of string constants
sub - class sub.
Defines AST constructor 'sub'.
sub(int, Expression, Expression) - Constructor for class sub
Creates "sub" AST node.
substr - Static variable in class TreeConstants
 

T

T1 - Static variable in class CgenSupport
 
T2 - Static variable in class CgenSupport
 
T3 - Static variable in class CgenSupport
 
TAG_OFFSET - Static variable in class CgenSupport
 
TreeConstants - class TreeConstants.
For convenience, this clas defines a large number of symbols.
TreeConstants() - Constructor for class TreeConstants
 
TreeNode - class TreeNode.
The base class for all AST nodes.
TreeNode(int) - Constructor for class TreeNode
Builds a new tree node
tbl - Variable in class AbstractTable
Vector of table entries
then_exp - Variable in class cond
 
toString() - Method in class AbstractSymbol
Returns a printable representation of this symbol.
toString() - Method in class AbstractTable
Produces a printable representation of the string table
toString() - Method in class ListNode
Returns a string representation of this list.
toString() - Method in class SymbolTable
Gets the string representation of the symbol table.
token - Variable in class int_const
 
token - Variable in class string_const
 
tokenToString(Symbol) - Static method in class Utilities
Returns a string representation for a token
truebool - Static variable in class BoolConst
 
typcase - class typcase.
Defines AST constructor 'typcase'.
typcase(int, Expression, Cases) - Constructor for class typcase
Creates "typcase" AST node.
type_decl - Variable in class attr
 
type_decl - Variable in class branch
 
type_decl - Variable in class formal
 
type_decl - Variable in class let
 
type_name - Static variable in class TreeConstants
 
type_name - Variable in class new_
 
type_name - Variable in class static_dispatch
 

U

Utilities - class Utilities.
 
Utilities() - Constructor for class Utilities
 

V

val - Static variable in class TreeConstants
 
val - Variable in class bool_const
 

W

WORD - Static variable in class CgenSupport
 
WORD_SIZE - Static variable in class CgenSupport
 

Z

ZERO - Static variable in class CgenSupport
 

A B C D E F G H I J L M N O P R S T U V W Z