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

C

CLASSNAME - Static variable in class Symbol
 
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.
COLON - Static variable in class Token
 
COMMA - Static variable in class Token
 
CompilerIO - Class in <Unnamed>
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.

D

DOT - Static variable in class Token
 

E

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.
EOF - Static variable in class Token
 

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.
getEchoing() - Method in class CompilerIO
Get the current state of the echoing property.
getEchoPrefix() - Method in class CompilerIO
Get the echo prefix string.
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

KEYWORD - Static variable in class Symbol
 
KW_CLASS - Static variable in class Token
 
KW_ELSE - Static variable in class Token
 
KW_IF - Static variable in class Token
 
KW_INTEGER - Static variable in class Token
 
KW_MOVIE - Static variable in class Token
 
KW_PROLOG - Static variable in class Token
 
KW_REAL - Static variable in class Token
 
KW_SHOW - Static variable in class Token
 
KW_STATIC - Static variable in class Token
 
KW_VOID - 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.
METHOD - Static variable in class Symbol
 

N

nextToken() - Method in class Scanner
Starting with the current character, identify the next Token and return the appropriate Token object to the caller.

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
 
readSrcLine() - Method in class CompilerIO
Read one line of input from the input file.
REAL - Static variable in class Token
 
RPAREN - Static variable in class Token
 

S

Scanner - Class in <Unnamed>
Scan an input stream looking for tokens defined for a simple language.
Scanner(CompilerIO, SymbolTable) - Constructor for class Scanner
Construct a new Scanner object.
ScanTest - Class in <Unnamed>
Simple Scanner driver
ScanTest() - Constructor for class ScanTest
 
SEMICOLON - Static variable in class Token
 
setEchoing(boolean) - Method in class CompilerIO
Set the echoing property.
setEchoPrefix(String) - Method in class CompilerIO
Set the echo prefix that is written out before each echoed line or other String written with emitWithPrefix.
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.
Symbol - Class in <Unnamed>
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 in <Unnamed>
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.

T

Token - Class in <Unnamed>
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.

U

UNKNOWN_TYPE - Static variable in class Symbol
 

V

VARIABLE - Static variable in class Symbol
 

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