ppg.lex
Class Token
java.lang.Object
ppg.lex.Token
public class Token
- extends java.lang.Object
Constructor Summary |
Token(int id,
java.lang.String filename,
int lineno,
int left,
int right,
java.lang.Object value)
|
Token(java.lang.String filename,
int lineno,
java.lang.Object value)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Token
public Token(java.lang.String filename,
int lineno,
java.lang.Object value)
Token
public Token(int id,
java.lang.String filename,
int lineno,
int left,
int right,
java.lang.Object value)
getCode
public int getCode()
getSymbol
public java_cup.runtime.Symbol getSymbol()
getValue
public java.lang.Object getValue()
getID
public java.lang.String getID()
toString
public static java.lang.String toString(int type)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
unparse
public void unparse(java.io.OutputStream o)
- Displays the parsed token in human-readable form.
The token has the form <token-type, attribute, line-number>
- Parameters:
o
- The OutputStream onto which to print the token
getFilename
public java.lang.String getFilename()
lineNumber
public int lineNumber()
- Returns:
- line number on which the token was found
getLineno
public int getLineno()
setLineno
public void setLineno(int i)