C D E G I K L M O P R S T

C

COLON - Static variable in class Token
 
COMMA - Static variable in class Token
 
CompilerIO - class CompilerIO.
This class handles all IO for the compiler application.
CompilerIO(String, String) - Constructor for class CompilerIO
Create a new CompilerIO object, using the file name given for the input file, and creating the output file name based on the input file name.
CompilerIO(String, String, String) - Constructor for class CompilerIO
Create a new CompilerIO object, using the file names given for the input file and the output file.
closeAll() - Method in class CompilerIO
Close the input, output, and temporary streams.
closeBuffer() - Method in class CompilerIO
Close the temporary Writer that we've been using to buffer the output and switch back to the output file as the target of all the emit methods.

D

DOT - Static variable in class Token
 

E

EOF - Static variable in class Token
 
emit(String) - Method in class CompilerIO
Write a string to the currently active output Writer.
emitBuffer() - Method in class CompilerIO
Write the contents of the temporary buffer to the output file.
emitFile(String) - Method in class CompilerIO
Copy an entire file to the currently active output Writer.
emitWithPrefix(String) - Method in class CompilerIO
Write the prefix and then the given string to the currently active output Writer.

G

getAttribute(String) - Method in class Symbol
Get an attribute from a Symbol.
getDoubleValue() - Method in class Token
Get the numeric attribute of this token as a double value.
getEchoPrefix() - Method in class CompilerIO
Get the echo prefix string.
getEchoing() - Method in class CompilerIO
Get the current state of the echoing property.
getIntValue() - Method in class Token
Get the numeric attribute of this token as an int value.
getLabel() - Method in class Symbol
Get the label attribute of this object.
getLabel() - Method in class Token
Get the String attribute of this object.
getSymbol(int, String) - Method in class SymbolTable
Get a symbol from table[k].
getType() - Method in class Symbol
Get the type of this Symbol.
getType() - Method in class Token
Get the type of this Token.

I

ID - Static variable in class Token
 
INTEGER - Static variable in class Token
 
isDeclared(int, String) - Method in class SymbolTable
Check to see if a symbol is in table[k].
isDeclared(String) - Method in class SymbolTable
Check to see if a symbol is in any of the defined tables.

K

KW_ELSE - Static variable in class Token
 
KW_IF - Static variable in class Token
 
KW_MOVIE - Static variable in class Token
 
KW_PROLOG - Static variable in class Token
 
KW_SHOW - Static variable in class Token
 

L

LCURLY - Static variable in class Token
 
LPAREN - Static variable in class Token
 

M

main(String[]) - Static method in class CompilerIO
Run a simple test of this CompilerIO class.
main(String[]) - Static method in class ScanTest
Test harness for the Scanner class.

O

OP_ADD - Static variable in class Token
 
OP_ASSIGN - Static variable in class Token
 
OP_DIV - Static variable in class Token
 
OP_EQ - Static variable in class Token
 
OP_GT - Static variable in class Token
 
OP_LT - Static variable in class Token
 
OP_MUL - Static variable in class Token
 
OP_NOT - Static variable in class Token
 
OP_SUB - Static variable in class Token
 
openBuffer() - Method in class CompilerIO
Create a new temporary Writer for buffering and set it to be the target of all the emit methods.

P

putAttribute(String, Object) - Method in class Symbol
Put an attribute in the HashMap of a Symbol.
putSymbol(int, String, Symbol) - Method in class SymbolTable
Add a symbol to table[k].

R

RCURLY - Static variable in class Token
 
REAL - Static variable in class Token
 
RPAREN - Static variable in class Token
 
readSrcLine() - Method in class CompilerIO
Read one line of input from the input file.

S

SEMICOLON - Static variable in class Token
 
ScanTest - class ScanTest.
Simple Scanner driver
ScanTest() - Constructor for class ScanTest
 
Symbol - class Symbol.
Each Symbol object represents one entry in a SymbolTable.
Symbol(String, int) - Constructor for class Symbol
Construct a new Symbol with the given name and type.
SymbolTable - class SymbolTable.
This class manages one or more symbol tables for a compiler.
SymbolTable() - Constructor for class SymbolTable
Construct a new SymbolTable manager with one table.
SymbolTable(int) - Constructor for class SymbolTable
Construct a new SymbolTable manager with n tables.
setEchoPrefix(String) - Method in class CompilerIO
Set the echo prefix that is written out before each echoed line or other String written with emitWithPrefix.
setEchoing(boolean) - Method in class CompilerIO
Set the echoing property.
setLabel(String) - Method in class Symbol
Set the label attribute of this object.
setType(int) - Method in class Symbol
Set the type of this Symbol.

T

Token - class Token.
Each Token object represents one token from the compiler input stream.
Token(int) - Constructor for class Token
Construct a new Token with no attributes except its type.
Token(int, String) - Constructor for class Token
Construct a new Token with an associated String attribute.
Token(int, int) - Constructor for class Token
Construct a new Token with an associated integer value attribute.
Token(int, double) - Constructor for class Token
Construct a new Token with an associated real value attribute.
toString() - Method in class Symbol
Provide the String that describes this Symbol.
toString() - Method in class Token
Provide the String that describes this Token.
typeLabel(int) - Static method in class Token
Provide the String that describes this Token type.

C D E G I K L M O P R S T