|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.nlp.Parsing.TokenType
public class TokenType
Generic Token Type. Can be subclassed for more specific token types.
$Id: TokenType.java,v 1.16 2008/01/03 03:21:57 mokhov Exp $
Field Summary | |
---|---|
static int |
BACKTRACK
This indicates we have to backtrack one token and don't do any extra processing. |
static int |
BRACKET
Bracket or parenthesis token type. |
static int |
EOF
End of File. |
static int |
ERROR
This indicates an error in the token. |
static int |
ID
Identifier token type. |
protected int |
iType
Current token type. |
static int |
KEYWORD
Identified keyword token type. |
static int |
NUM
Numerical token type. |
static int |
OPERATOR
Operator token type. |
static int |
PUNCT
Punctuation token type. |
static java.util.Hashtable |
soTokenTypes
Hash representing literal values of the above tokens (for output, for example). |
static int |
UNKNOWN
Unknown token type. |
Constructor Summary | |
---|---|
TokenType()
Default Constructor. |
Method Summary | |
---|---|
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
int |
getType()
Allows querying for the current token type. |
void |
setType(int piType)
Allows setting the current token type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ID
public static final int NUM
public static final int OPERATOR
public static final int PUNCT
public static final int BRACKET
public static final int KEYWORD
public static final int UNKNOWN
public static final int EOF
public static final int ERROR
public static final int BACKTRACK
protected int iType
public static java.util.Hashtable soTokenTypes
Constructor Detail |
---|
public TokenType()
Method Detail |
---|
public int getType()
public void setType(int piType)
piType
- the piType token typepublic static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |