|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.nlp.Parsing.TokenType marf.nlp.Parsing.TokenSubType
public class TokenSubType
MARF Specific Tokens Types.
$Id: TokenSubType.java,v 1.16 2008/01/03 03:21:57 mokhov Exp $
Field Summary | |
---|---|
static int |
AND
Constant for keyword "and". |
static int |
CLASS
Constant for keyword "class". |
static int |
COMMA
Constant for "comma". |
static int |
CURLY_CL
Constant for "closed curly brace". |
static int |
CURLY_OP
Constant for "open curly brace". |
static int |
DO
Constant for keyword "do". |
static int |
ELSE
Constant for keyword "else". |
static int |
IF
Constant for keyword "if". |
static int |
INTEGER
Constant for keyword "integer". |
protected int |
iSubtype
Token subtype; default is UNKNOWN. |
static int |
NOT
Constant for keyword "not". |
static int |
OP_ASIGN
Constant for operator "assign". |
static int |
OP_DIV
Constant for operator "divide". |
static int |
OP_EQ
Constant for operator "equals". |
static int |
OP_GE
Constant for operator "greater than or equal to". |
static int |
OP_GT
Constant for operator "greater than". |
static int |
OP_LE
Constant for operator "less than or equal to". |
static int |
OP_LT
Constant for operator "less than". |
static int |
OP_MEMB
Constant for operator "object membership". |
static int |
OP_MINUS
Constant for operator "minus". |
static int |
OP_MULT
Constant for operator "multiply". |
static int |
OP_NE
Constant for operator "not equal". |
static int |
OP_PLUS
Constant for operator "plus". |
static int |
OR
Constant for keyword "or". |
static int |
PAREN_CL
Constant for "closed parenthesis". |
static int |
PAREN_OP
Constant for "open parenthesis". |
static int |
PROGRAM
Constant for keyword "program". |
static int |
READ
Constant for keyword "read". |
static int |
REAL
Constant for keyword "real". |
static int |
RETURN
Constant for keyword "return". |
static int |
SEMICOLON
Constant for "semicolon". |
static java.util.Hashtable |
soBrackets
Maps constants and brackets, parentheses, and braces. |
static java.util.Hashtable |
soKeywords
Maps constants and keyword spellings. |
static java.util.Hashtable |
soOperators
Maps constants and operators. |
static java.util.Hashtable |
soTokenSubTypes
Matches numbers to literals for output purposes. |
static java.util.Hashtable |
soValidPunctuation
Maps constants and punctuation. |
static int |
SQR_CL
Constant for "close square bracket". |
static int |
SQR_OP
Constant for "open square bracket". |
static int |
THEN
Constant for keyword "then". |
static int |
THIS
Constant for keyword "this". |
static int |
WHILE
Constant for keyword "while". |
static int |
WRITE
Constant for keyword "write". |
Fields inherited from class marf.nlp.Parsing.TokenType |
---|
BACKTRACK, BRACKET, EOF, ERROR, ID, iType, KEYWORD, NUM, OPERATOR, PUNCT, soTokenTypes, UNKNOWN |
Constructor Summary | |
---|---|
TokenSubType()
Default Constructor. |
Method Summary | |
---|---|
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
int |
getSubtype()
Allows querying for the current token sub-type. |
void |
setSubtype(int piSubtype)
Allows setting the current token sub-type. |
void |
setSubTypeByLexeme(java.lang.String pstrLexeme)
Sets token sub-type given its lexeme. |
Methods inherited from class marf.nlp.Parsing.TokenType |
---|
getType, setType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int iSubtype
TokenType.UNKNOWN
public static final int OP_EQ
public static final int OP_NE
public static final int OP_LT
public static final int OP_GT
public static final int OP_LE
public static final int OP_GE
public static final int OP_PLUS
public static final int OP_MINUS
public static final int OP_MULT
public static final int OP_DIV
public static final int OP_ASIGN
public static final int OP_MEMB
public static final int COMMA
public static final int SEMICOLON
public static final int PAREN_OP
public static final int PAREN_CL
public static final int CURLY_OP
public static final int CURLY_CL
public static final int SQR_OP
public static final int SQR_CL
public static final int DO
public static final int ELSE
public static final int IF
public static final int INTEGER
public static final int CLASS
public static final int READ
public static final int REAL
public static final int RETURN
public static final int THEN
public static final int WHILE
public static final int WRITE
public static final int PROGRAM
public static final int AND
public static final int NOT
public static final int OR
public static final int THIS
public static java.util.Hashtable soKeywords
public static java.util.Hashtable soValidPunctuation
public static java.util.Hashtable soOperators
public static java.util.Hashtable soBrackets
public static java.util.Hashtable soTokenSubTypes
Constructor Detail |
---|
public TokenSubType()
Method Detail |
---|
public void setSubTypeByLexeme(java.lang.String pstrLexeme)
pstrLexeme
- the lexeme to determine the token sub-typepublic int getSubtype()
public void setSubtype(int piSubtype)
piSubtype
- the new token subtypepublic static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |