Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
C
E
G
I
K
L
M
N
O
P
R
S
T
C
close()
- Method in class
CompilerIO
Close the input and output streams.
COMMA
- Static variable in class
Token
CompilerIO
- class
CompilerIO
.
This class handles all IO for the compiler application.
CompilerIO(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)
- Constructor for class
CompilerIO
Create a new CompilerIO object, using the two file names given.
E
EOF
- Static variable in class
Token
G
getEchoing()
- Method in class
CompilerIO
Get the echoing property.
getEchoPrefix()
- Method in class
CompilerIO
Get the echo prefix string.
getLabel()
- Method in class
Token
Get the String attribute of this object.
getType()
- Method in class
Token
Get the type of this Token.
getValue()
- Method in class
Token
Get the integer attribute of this object.
I
ID
- Static variable in class
Token
INT
- Static variable in class
Token
K
KW_ELSE
- Static variable in class
Token
KW_IF
- Static variable in class
Token
KW_INT
- Static variable in class
Token
KW_RETURN
- Static variable in class
Token
KW_WHILE
- 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.
main(String[])
- Static method in class
TokenTest
Super simple test case.
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_EQ
- Static variable in class
Token
OP_GT
- 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
P
printAsmLine(String)
- Method in class
CompilerIO
Write a string out to the output file.
R
RCURLY
- Static variable in class
Token
readSrcLine()
- Method in class
CompilerIO
Read one line of input from the originally specified input file.
RPAREN
- Static variable in class
Token
S
Scanner
- class
Scanner
.
Scan an input stream looking for tokens defined for a simple language.
Scanner(CompilerIO)
- Constructor for class
Scanner
Construct a new Scanner object.
ScanTest
- class
ScanTest
.
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.
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, int)
- Constructor for class
Token
Construct a new Token with an associated integer value attribute.
Token(int, String)
- Constructor for class
Token
Construct a new Token with an associated String attribute.
TokenTest
- class
TokenTest
.
Provide a simple test harness for the Token class.
TokenTest()
- Constructor for class
TokenTest
toString()
- Method in class
Token
Provide the String that describes this Token.
C
E
G
I
K
L
M
N
O
P
R
S
T
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes