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

A

AND - Static variable in class sym
 
action_obj - Variable in class EJayParser
Instance of action encapsulation class.
action_table() - Method in class EJayParser
Access to parse-action table.
allocate(int) - Static method in class Memory
Allocate an Object-valued memory array of the given size.
ascend() - Method in class SymbolTable
Move up one parent level from this symtab, returning a reference to the new level.

B

BLOCK_SYMTAB_SIZE - Variable in class EJayParser
Reasonable size for a block symbol table.
BOOLEAN - Static variable in class sym
 
BlockEntry - class BlockEntry.
BlockEntry extends SymbolTableEntry by adding a data field to support nested scoping.
BlockEntry() - Constructor for class BlockEntry
Construct this with null data fields.
BlockEntry(SymbolTable) - Constructor for class BlockEntry
Construct this with the given data field value.
BoolType - Static variable in class Types
The bool type
blockNum - Variable in class EJayParser
Incrementing counter for nested blocks.
body - Variable in class FunctionEntry
Function body, in the form of its raw parse tree.
buildMainCall() - Static method in class EJayInterpreterTest
Construct the parse tree to invoke the main method.

C

COMMA - Static variable in class sym
 
child - Variable in class TreeNode1
Reference to the single child of this node.
child1 - Variable in class TreeNode2
Reference to the left child of this node.
child1 - Variable in class TreeNode3
Reference to the left child of this node.
child1 - Variable in class TreeNode4
Reference to the left child of this node.
child2 - Variable in class TreeNode2
Reference to the right child of this node.
child2 - Variable in class TreeNode3
Reference to the middle child of this node.
child2 - Variable in class TreeNode4
Reference to the first middle (or second, or third-from-the-last) child of this node.
child3 - Variable in class TreeNode3
Reference to the right child of this node.
child3 - Variable in class TreeNode4
Reference to the second middle (or third, or next-to-the-last) child of this node.
child4 - Variable in class TreeNode4
Reference to the right (or fourth, or last, or rightmost, or whatever-the-heck-you-want-to-call-it) child of this node.
clear(Object[]) - Static method in class Memory
Set all elements of the given memory to null.

D

DIVIDE - Static variable in class sym
 
DOT - Static variable in class sym
 
descend(String) - Method in class SymbolTable
Move down one level in this symtab, returning a reference to the new level.
doToString(int, String) - Method in class SymbolTableEntry
Common work doer for other toStrings.
do_action(int, lr_parser, Stack, int) - Method in class EJayParser
Invoke a user supplied parse action.
dump(Object[], int) - Static method in class Memory
Dump the given number of elements in the given memory to stdout.
dump(Object[], int, int) - Static method in class Memory
Dump the given memory to stdout, from the given startElem to endElem indices, inclusive.
dump(Object[], int, int, int) - Static method in class Memory
Same as dump(Object[], int, int), but with indent of locations.
dump(SymbolTable) - Method in class SymbolTable
Dump out the contents of the given symbtab, dumping entries serially, and recursively traversing into scoping levels.
dumpRelative(Object[], int, int) - Static method in class Memory
Dump the given memory to stdout, from the given startElem to endElem indices, inclusive.
dumpRelative(Object[], int, int, int) - Static method in class Memory
Same as dumpRelative, but with indent of locations.

E

EJayInterpreterNoFuncsTest - class EJayInterpreterNoFuncsTest.
Simplified test program for CSC 330 Assignment 4.
EJayInterpreterNoFuncsTest() - Constructor for class EJayInterpreterNoFuncsTest
 
EJayInterpreterTest - class EJayInterpreterTest.
Test program for CSC 330 Assignment 4.
EJayInterpreterTest() - Constructor for class EJayInterpreterTest
 
EJayParser - class EJayParser.
CUP v0.10k generated parser.
EJayParser() - Constructor for class EJayParser
Default constructor.
EJayParser(Scanner) - Constructor for class EJayParser
Constructor which sets the default scanner.
ELSE - Static variable in class sym
 
EOF - Static variable in class sym
 
EOF_sym() - Method in class EJayParser
EOF Symbol index.
EQ - Static variable in class sym
 
EQ_EQ - Static variable in class sym
 
enter(SymbolTableEntry) - Method in class SymbolTable
Enter the given symtab entry into this symtab, if an entry of that name does not already exist.
enterBlock(String) - Method in class EJayParser
Enter an inner block by allocating a symtab for it, entering a unique-named BlockEntry for it in the current symtab, and descending into the new block symtab.
enterVars(TypeNode, TreeNodeList) - Method in class EJayParser
Enter the vars in the given tree node list in the current symtab.
entries - Variable in class SymbolTable
The hash table of entries
entry - Variable in class EJayParser
Reference to the current function entry.
equiv(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are structurally equivalent.
equivArrayTypes(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are the equivalent array types.
equivName(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are name equivalent.
equivStructTypes(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are the equivalent struct types.
error(TreeNode, String) - Static method in class Utilities
Print to stderr the line and column numbers of the given node, followed by the text of the given error message.
error - Static variable in class sym
 
error_sym() - Method in class EJayParser
error Symbol index.

F

FALSE - Static variable in class sym
 
FLOAT - Static variable in class sym
 
FLOATING_PT - Static variable in class sym
 
FUNC_SYMTAB_SIZE - Variable in class EJayParser
Reasonable size for a function symbol table.
FloatType - Static variable in class Types
The float type
FunctionEntry - class FunctionEntry.
FunctionEntry extends SymbolTableEntry by adding data fields to support functions, procedures, and methods.
FunctionEntry() - Constructor for class FunctionEntry
Construct this with null data fields.
FunctionEntry(String, TypeNode, TreeNodeList, TreeNode, SymbolTable) - Constructor for class FunctionEntry
Construct this with the given data field values.
formals - Variable in class FunctionEntry
Formal parameter list, in declared order.
formalsString(int) - Method in class FunctionEntry
Called by toString to stringify the list of formal parameter names.

G

GTR - Static variable in class sym
 
GTR_EQ - Static variable in class sym
 
getSymbolTable() - Method in class EJayParser
 
getVal() - Method in class LValue
Return the value of this as an integer address.
grabMainBody(SymbolTable) - Static method in class EJayInterpreterNoFuncsTest
Extract the executable statements list from the body of the main method.

I

IDENT - Static variable in class sym
 
IF - Static variable in class sym
 
INT - Static variable in class sym
 
INTEGER - Static variable in class sym
 
IntType - Static variable in class Types
The int type
id - Variable in class TreeNode
The ID of this node.
indentString(int) - Method in class SymbolTableEntry
Convenience method for creating an indent string.
initSymbolTable(int) - Method in class EJayParser
 
init_actions() - Method in class EJayParser
Action encapsulation object initializer.
isBool(TypeNode) - Static method in class Types
Return true if the given type is an atomic boolean type.
isFloat(TypeNode) - Static method in class Types
Return true if the given type is an atomic floating point type.
isInt(TypeNode) - Static method in class Types
Return true if the given type is an atomic integer type.
isNumeric(TypeNode) - Static method in class Types
Return true if t is a numeric type, i.e., INT or FLOAT.
isRef - Variable in class VariableEntry
True if this is a reference variable or parameter.
isString(TypeNode) - Static method in class Types
Return true if the given type is an atomic string type.
isVoid(TypeNode) - Static method in class Types
Return true if the given type is an atomic void type.

L

LEFT_BRACE - Static variable in class sym
 
LEFT_BRKT - Static variable in class sym
 
LEFT_PAREN - Static variable in class sym
 
LESS - Static variable in class sym
 
LESS_EQ - Static variable in class sym
 
LValue - class LValue.
LValue is a specialized Value extension to represent the address-valued result of evaluating a memory designator.
LValue(Object, TypeNode) - Constructor for class LValue
 
LeafNode - class LeafNode.
LeafNode extends TreeNode by adding an Object value field, but no subtree references.
LeafNode(int, Object) - Constructor for class LeafNode
Construct with the given id and value.
LeafNode(int, Object, int, int) - Constructor for class LeafNode
A la the other constructor, but with line and column numbers.
level - Variable in class SymbolTable
Nesting level of this, starting with 0 at the top.
level - Variable in class VariableEntry
The lexical nesting level of this variable.
lookup(String) - Method in class SymbolTable
Lookup an entry by name in this symtab.
lookupLocal(String) - Method in class SymbolTable
Lookup an entry by name in this symtab only.

M

MINUS - Static variable in class sym
 
Memory - class Memory.
Class Memory has static utility methods for allocating, clearing, and dumping an Object-valued memory array.
Memory() - Constructor for class Memory
 
main(String[]) - Static method in class EJayInterpreterNoFuncsTest
See the class comment for documentation.
main(String[]) - Static method in class EJayInterpreterTest
See the class comment for documentation.
map - Static variable in class symNames
Int-to-string token mapping array
memoryLocation - Variable in class VariableEntry
Memory location
memorySize - Variable in class SymbolTable
Incrementing counter for the memory addresses of data values declared in this symtab's scope.

N

NOT - Static variable in class sym
 
NOT_EQ - Static variable in class sym
 
name - Variable in class SymbolTableEntry
This symbol's name
newLevel(FunctionEntry, int) - Method in class SymbolTable
Allocate a new symtab and add it as a new level to this symtab.
node - Variable in class TreeNodeList
Reference to the first node of this (sub)list.

O

OR - Static variable in class sym
 

P

PLUS - Static variable in class sym
 
PRINT - Static variable in class sym
 
parent - Variable in class SymbolTable
The parent table in the tree structure, i.e., the symtab of this' enclosing scope.
production_table() - Method in class EJayParser
Access to production table.

R

REF - Static variable in class sym
 
RETURN - Static variable in class sym
 
RT_BRACE - Static variable in class sym
 
RT_BRKT - Static variable in class sym
 
RT_PAREN - Static variable in class sym
 
reduce_table() - Method in class EJayParser
Access to reduce_goto table.

S

SEMI - Static variable in class sym
 
STRING - Static variable in class sym
 
STRING_LIT - Static variable in class sym
 
STRUCT - Static variable in class sym
 
StringType - Static variable in class Types
The string type
SymbolTable - class SymbolTable.
SymbolTable is a datatype for a tree structured table, where each node in the tree represents a program scope.
SymbolTable(int) - Constructor for class SymbolTable
Allocate a new symtab of the given size.
SymbolTableEntry - class SymbolTableEntry.
A SymbolTableEntry holds semantic information for a symbol declared in a program.
SymbolTableEntry() - Constructor for class SymbolTableEntry
Construct this with null data fields.
SymbolTableEntry(String, TypeNode) - Constructor for class SymbolTableEntry
Construct this with the given data field values.
sameIdentTypes(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are the same identifier type, i.e., the have the same type name.
samePrimitiveTypes(TypeNode, TypeNode) - Static method in class Types
Return true if t1 and t2 are the same primitive types.
scope - Variable in class BlockEntry
Local scope for this function.
scope - Variable in class FunctionEntry
Local scope for this function.
scopeString(int) - Method in class BlockEntry
Called by toString to recursively stringify the scope, if non-null.
scopeString(int) - Method in class FunctionEntry
Called by toString to recursively stringify the scope, if non-null.
siblings - Variable in class TreeNodeList
Reference to the rest of this (sub)list
start_production() - Method in class EJayParser
Indicates start production.
start_state() - Method in class EJayParser
Indicates start state.
structNum - Variable in class EJayParser
Incrementing counter for declared structs.
sym - class sym.
CUP generated class containing symbol constants.
sym() - Constructor for class sym
 
symNames - class symNames.
This class contains a public array that maps an int token id into its string representation.
symNames() - Constructor for class symNames
 
symPrint(int) - Static method in class TreeNode
Print a readable string value for a numeric-valued tree ID.
symtab - Variable in class EJayParser
Reference to current symbol table.
symtab - Variable in class TypeNode
Reference to a symbol table, for struct, record, and class types.
syntax_error(Symbol) - Method in class EJayParser
 

T

TIMES - Static variable in class sym
 
TRUE - Static variable in class sym
 
TreeNode - class TreeNode.
TreeNode is the abstract parent class for a parse tree node.
TreeNode() - Constructor for class TreeNode
Construct a tree node with id = 0.
TreeNode(int) - Constructor for class TreeNode
Construct a tree node with the given id.
TreeNode(int, int, int) - Constructor for class TreeNode
Construct a tree node with the given id, with the given line and column source file character positions.
TreeNode1 - class TreeNode1.
TreeNode1 extends TreeNode by adding one child component, which is a reference to another TreeNode.
TreeNode1(int, TreeNode) - Constructor for class TreeNode1
Construct this with the given id and child TreeNode reference.
TreeNode1(int, TreeNode, int, int) - Constructor for class TreeNode1
A la the other constructor, but with line and column numbers.
TreeNode2 - class TreeNode2.
TreeNode2 extends TreeNode by adding two child components, which are references other TreeNodes.
TreeNode2(int, TreeNode, TreeNode) - Constructor for class TreeNode2
Construct this with the given id and child TreeNode references.
TreeNode2(int, TreeNode, TreeNode, int, int) - Constructor for class TreeNode2
A la the other constructor, but with line and column numbers.
TreeNode3 - class TreeNode3.
TreeNode3 extends TreeNode by adding three child components, which are references other TreeNodes.
TreeNode3(int, TreeNode, TreeNode, TreeNode) - Constructor for class TreeNode3
Construct this with the given id and child TreeNode references.
TreeNode3(int, TreeNode, TreeNode, TreeNode, int, int) - Constructor for class TreeNode3
A la the other constructor, but with line and column numbers.
TreeNode4 - class TreeNode4.
TreeNode4 extends TreeNode by adding four child components, which are references other TreeNodes.
TreeNode4(int, TreeNode, TreeNode, TreeNode, TreeNode) - Constructor for class TreeNode4
Construct this with the given id and child TreeNode references.
TreeNode4(int, TreeNode, TreeNode, TreeNode, TreeNode, int, int) - Constructor for class TreeNode4
A la the other constructor, but with line and column numbers.
TreeNodeList - class TreeNodeList.
TreeNodeList extends TreeNode by adding a node component and a siblings component.
TreeNodeList(TreeNode, TreeNodeList) - Constructor for class TreeNodeList
Construct this with the given id and child TreeNode references.
TypeNode - class TypeNode.
TypeNode is a specialized extension of TreeNode4 intended for use in tree evaluation contexts where the node is known to be a type.
TypeNode(int) - Constructor for class TypeNode
Construct this with the given id and null children.
TypeNode(int, TreeNode) - Constructor for class TypeNode
Construct this with the given id and given single child.
TypeNode(int, TreeNode, TreeNode) - Constructor for class TypeNode
Construct this with the given id and given two children.
TypeNode(int, TreeNode, TreeNode, TreeNode) - Constructor for class TypeNode
Construct this with the given id and given three children.
TypeNode(int, TreeNode, TreeNode, TreeNode, TreeNode) - Constructor for class TypeNode
Construct this with the given id and given four children.
TypeNode(int, int, int) - Constructor for class TypeNode
A la the other constructor, but with line and column numbers.
TypeNode(int, TreeNode, int, int) - Constructor for class TypeNode
A la the other constructor, but with line and column numbers.
TypeNode(int, TreeNode, TreeNode, int, int) - Constructor for class TypeNode
A la the other constructor, but with line and column numbers.
TypeNode(int, TreeNode, TreeNode, TreeNode, int, int) - Constructor for class TypeNode
A la the other constructor, but with line and column numbers.
TypeNode(int, TreeNode, TreeNode, TreeNode, TreeNode, int, int) - Constructor for class TypeNode
A la the other constructor, but with line and column numbers.
Types - class Types.
Class Types has static methods for type equivalencing and other forms of type interrogation.
Types() - Constructor for class Types
 
toString(int) - Method in class BlockEntry
Return the string rep of this.
toString(int) - Method in class FunctionEntry
Return the string rep of this.
toString(int) - Method in class LeafNode
Return the string representation of this leaf, which starts with the String value of its ID.
toString() - Method in class SymbolTable
Produce the string value printed by dump.
toString(int) - Method in class SymbolTable
Work doer for toString.
toString() - Method in class SymbolTableEntry
Return toString(0).
toString(int) - Method in class SymbolTableEntry
Return the string representation of this' two fields, with other fields added by this' extensions.
toString() - Method in class TreeNode
Output the String representation of a pre-order tree traversal.
toString(int) - Method in class TreeNode
This is the recursive work-doer for toString.
toString(int) - Method in class TreeNode1
Return the String representation of this subtree, which is the String value of its ID, followed on the next indented line by the recursive toString of its child.
toString(int) - Method in class TreeNode2
Return the String representation of this subtree, which is the String value of its ID, followed on the next two indented lines by the recursive toString of its two children.
toString(int) - Method in class TreeNode3
Return the String representation of this subtree, which is the String value of its ID, followed on the next three indented lines by the recursive toString of its three children.
toString(int) - Method in class TreeNode4
Return the String representation of this subtree, which is the String value of its ID, followed on the next four indented lines by the recursive toString of its four children.
toString(int) - Method in class TreeNodeList
Return the String representation of this subtree, which is the recursive toString of each of its nodes, separated by a ';' on a new line plus another blank line.
toString(int) - Method in class TypeNode
Return the String representation of this subtree, which is the String value of its ID, followed on the next zero to four indented lines by the recursive toString of its four children.
toString() - Method in class Value
Return the string representation of this as the toString of its value and type.
toString(int) - Method in class VariableEntry
Return the string rep of this, which consists of the return value of super.toString, plus the values of this.isRef and this.memoryLocation.
toStringDeep() - Method in class SymbolTableEntry
Return toStringDeep(0).
toStringDeep(int) - Method in class SymbolTableEntry
Version of toString that dumps out the full type structure, not just its root ID.
toStringLineAndColumn(String) - Method in class TreeNode
Common method for subclasses' toStrings to append line number and column positions, if they have been explicitly set for this node.
type - Variable in class SymbolTableEntry
Data type, represented as a parse tree.
type - Variable in class Value
The type-tag field

U

UNY_MINUS - Static variable in class sym
 
UNY_PLUS - Static variable in class sym
 
Utilities - class Utilities.
Utilities defines utility methods for use in the interperter.
Utilities() - Constructor for class Utilities
 

V

VOID - Static variable in class sym
 
Value - class Value.
Class Value is the representation of a "tagged value", as employed in interpreters that perform runtime type checking.
Value(Object, TypeNode) - Constructor for class Value
Construct this with the given value and type.
VariableEntry - class VariableEntry.
VariableEntry extends SymbolTableEntry by adding data fields to support variables and parameters.
VariableEntry() - Constructor for class VariableEntry
Construct this with null data fields.
VariableEntry(String, TypeNode, boolean, int, int) - Constructor for class VariableEntry
Construct this with the given data field values.
VoidType - Static variable in class Types
The void type
val - Variable in class Value
The value field
value - Variable in class LeafNode
The generic value of this node, used for identifier names and literal values.

W

WHILE - Static variable in class sym
 

_

_action_table - Static variable in class EJayParser
Parse-action table.
_production_table - Static variable in class EJayParser
Production table.
_reduce_table - Static variable in class EJayParser
reduce_goto table.

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