com.jeffpalm.cop5555.tok
Class Token
java.lang.Object
com.jeffpalm.cop5555.tok.Token
- Direct Known Subclasses:
- EofToken, IdentToken, KeywordToken, NumberToken
public abstract class Token
- extends java.lang.Object
Constructor Summary |
Token()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
type
protected int type
line
protected int line
col
protected int col
str
protected java.lang.String str
EMPTY
public static final int EMPTY
- Constants for the symbols
- See Also:
- Constant Field Values
PROGRAM
public static final int PROGRAM
- See Also:
- Constant Field Values
CONST
public static final int CONST
- See Also:
- Constant Field Values
VAR
public static final int VAR
- See Also:
- Constant Field Values
INT
public static final int INT
- See Also:
- Constant Field Values
VOID
public static final int VOID
- See Also:
- Constant Field Values
READ
public static final int READ
- See Also:
- Constant Field Values
WRITE
public static final int WRITE
- See Also:
- Constant Field Values
IF
public static final int IF
- See Also:
- Constant Field Values
ELSE
public static final int ELSE
- See Also:
- Constant Field Values
WHILE
public static final int WHILE
- See Also:
- Constant Field Values
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
STAR
public static final int STAR
- See Also:
- Constant Field Values
DIV
public static final int DIV
- See Also:
- Constant Field Values
LT
public static final int LT
- See Also:
- Constant Field Values
LE
public static final int LE
- See Also:
- Constant Field Values
GT
public static final int GT
- See Also:
- Constant Field Values
GE
public static final int GE
- See Also:
- Constant Field Values
EQ
public static final int EQ
- See Also:
- Constant Field Values
EQEQ
public static final int EQEQ
- See Also:
- Constant Field Values
NE
public static final int NE
- See Also:
- Constant Field Values
LBRACE
public static final int LBRACE
- See Also:
- Constant Field Values
RBRACE
public static final int RBRACE
- See Also:
- Constant Field Values
LPAREN
public static final int LPAREN
- See Also:
- Constant Field Values
RPAREN
public static final int RPAREN
- See Also:
- Constant Field Values
SEMI
public static final int SEMI
- See Also:
- Constant Field Values
COMMA
public static final int COMMA
- See Also:
- Constant Field Values
CARET
public static final int CARET
- See Also:
- Constant Field Values
ERROR
public static final int ERROR
- See Also:
- Constant Field Values
COMMENT
public static final int COMMENT
- See Also:
- Constant Field Values
NUMBER
public static final int NUMBER
- See Also:
- Constant Field Values
IDENT
public static final int IDENT
- See Also:
- Constant Field Values
RETURN
public static final int RETURN
- See Also:
- Constant Field Values
EOF
public static final int EOF
- See Also:
- Constant Field Values
MOD
public static final int MOD
- See Also:
- Constant Field Values
L_SHIFT
public static final int L_SHIFT
- See Also:
- Constant Field Values
R_SHIFT
public static final int R_SHIFT
- See Also:
- Constant Field Values
OR
public static final int OR
- See Also:
- Constant Field Values
AND
public static final int AND
- See Also:
- Constant Field Values
XOR
public static final int XOR
- See Also:
- Constant Field Values
INC
public static final int INC
- See Also:
- Constant Field Values
DEC
public static final int DEC
- See Also:
- Constant Field Values
MAX_TOKEN
public static final int MAX_TOKEN
- See Also:
- Constant Field Values
syms
public static final java.lang.String[] syms
Token
public Token()
dup
public abstract Token dup()
stringRep
public static java.lang.String stringRep(int num)
stringRep
public java.lang.String stringRep()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getString
public java.lang.String getString()
isEof
public boolean isEof()
getLine
public int getLine()
getCol
public int getCol()
getType
public int getType()
getPos
public Pos getPos()
is
public boolean is(int type)