|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaminePlatform.guis.prologPlusCGGUIs.prologPlusCGGUI.Token
aminePlatform.guis.prologPlusCGGUIs.prologPlusCGGUI.PrologCGToken
A PrologCG is a token that is returned by a lexer that is lexing a PrologCG
source file. It has several attributes describing the token:
The type of token, the text of the token, the line number on which it
occurred, the number of characters into the input at which it started, and
similarly, the number of characters into the input at which it ended.
The tokens should comply with the PrologCG Language Specification.
Fields inherited from class aminePlatform.guis.prologPlusCGGUIs.prologPlusCGGUI.Token |
INITIAL_STATE, UNDEFINED_STATE |
Constructor Summary | |
PrologCGToken(int ID,
java.lang.String contents,
int lineNumber,
int charBegin,
int charEnd)
Create a new token. |
|
PrologCGToken(int ID,
java.lang.String contents,
int lineNumber,
int charBegin,
int charEnd,
int state)
Create a new token. |
Method Summary | |
java.lang.String |
errorString()
get a String that explains the error, if this token is an error. |
int |
getCharBegin()
get the offset into the input in characters at which this token started |
int |
getCharEnd()
get the offset into the input in characters at which this token ended |
java.lang.String |
getContents()
get the contents of this token |
java.lang.String |
getDescription()
A description of this token. |
int |
getID()
get the ID number of this token |
int |
getLineNumber()
get the line number of the input on which this token started |
int |
getState()
Get an integer representing the state the tokenizer is in after returning this token. |
boolean |
isComment()
Checks this token to see if it is a comment. |
boolean |
isError()
Checks this token to see if it is an Error. |
boolean |
isIdentifier()
Checks this token to see if it is an identifier. |
boolean |
isJavaMessage()
Checks this token to see if it is a java message. |
boolean |
isLiteral()
Checks this token to see if it is a literal. |
boolean |
isOperator()
Checks this token to see if it is a Operator. |
boolean |
isReservedWord()
Checks this token to see if it is a reserved word. |
boolean |
isSeparator()
Checks this token to see if it is a Separator. |
boolean |
isVariable()
Checks this token to see if it is Variable. |
boolean |
isWhiteSpace()
Checks this token to see if it is White Space. |
java.lang.String |
toString()
get a representation of this token as a human readable string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int RESERVED_WORD_READ
public static final int RESERVED_WORD_ASSERTA
public static final int RESERVED_WORD_ASSERTZ
public static final int RESERVED_WORD_RETRACT
public static final int RESERVED_WORD_IS
public static final int RESERVED_WORD_FAIL
public static final int RESERVED_WORD_READSENTENCE
public static final int RESERVED_WORD_WRITE
public static final int RESERVED_WORD_WRITELN
public static final int RESERVED_WORD_CONCOFCG
public static final int RESERVED_WORD_BRANCHOFCG
public static final int RESERVED_WORD_SUPPRESS
public static final int RESERVED_WORD_LOADDB
public static final int RESERVED_WORD_SAVEDB
public static final int RESERVED_WORD_LIST
public static final int RESERVED_WORD_LISTALL
public static final int RESERVED_WORD_GETONTOLOGY
public static final int RESERVED_WORD_GETLEXICON
public static final int VARIABLE
public static final int IDENTIFIER
public static final int UNITELEXICALESPECIALE
public static final int MESSAGEJAVA
public static final int LITERAL_BOOLEAN
public static final int LITERAL_INTEGER_DECIMAL
public static final int LITERAL_INTEGER_OCTAL
public static final int LITERAL_INTEGER_HEXIDECIMAL
public static final int LITERAL_LONG_DECIMAL
public static final int LITERAL_LONG_OCTAL
public static final int LITERAL_LONG_HEXIDECIMAL
public static final int LITERAL_FLOATING_POINT
public static final int LITERAL_DOUBLE
public static final int LITERAL_CHARACTER
public static final int LITERAL_STRING
public static final int LITERAL_NULL
public static final int LITERAL_SUPER
public static final int LITERAL_THIS
public static final int SEPARATOR_LPAREN
public static final int SEPARATOR_RPAREN
public static final int SEPARATOR_LBRACE
public static final int SEPARATOR_RBRACE
public static final int SEPARATOR_LBRACKET
public static final int SEPARATOR_RBRACKET
public static final int SEPARATOR_SEMICOLON
public static final int SEPARATOR_COMMA
public static final int SEPARATOR_PERIOD
public static final int OPERATOR_GREATER_THAN
public static final int OPERATOR_LESS_THAN
public static final int OPERATOR_LESS_THAN_OR_EQUAL
public static final int OPERATOR_GREATER_THAN_OR_EQUAL
public static final int OPERATOR_EQUAL
public static final int OPERATOR_NOT_EQUAL
public static final int OPERATOR_LOGICAL_NOT
public static final int OPERATOR_LOGICAL_AND
public static final int OPERATOR_LOGICAL_OR
public static final int OPERATOR_ADD
public static final int OPERATOR_SUBTRACT
public static final int OPERATOR_MULTIPLY
public static final int OPERATOR_DIVIDE
public static final int OPERATOR_MOD
public static final int OPERATOR_BITWISE_COMPLIMENT
public static final int OPERATOR_BITWISE_AND
public static final int OPERATOR_BITWISE_OR
public static final int OPERATOR_BITWISE_XOR
public static final int OPERATOR_SHIFT_LEFT
public static final int OPERATOR_SHIFT_RIGHT
public static final int OPERATOR_SHIFT_RIGHT_UNSIGNED
public static final int OPERATOR_ASSIGN
public static final int OPERATOR_ADD_ASSIGN
public static final int OPERATOR_SUBTRACT_ASSIGN
public static final int OPERATOR_MULTIPLY_ASSIGN
public static final int OPERATOR_DIVIDE_ASSIGN
public static final int OPERATOR_MOD_ASSIGN
public static final int OPERATOR_AFFECT_RIGHT
public static final int OPERATOR_AFFECT_LEFT
public static final int OPERATOR_AFFECT
public static final int OPERATOR_AFFECTDouble
public static final int OPERATOR_BITWISE_AND_ASSIGN
public static final int OPERATOR_BITWISE_OR_ASSIGN
public static final int OPERATOR_BITWISE_XOR_ASSIGN
public static final int OPERATOR_SHIFT_LEFT_ASSIGN
public static final int OPERATOR_SHIFT_RIGHT_ASSIGN
public static final int OPERATOR_SHIFT_RIGHT_UNSIGNED_ASSIGN
public static final int OPERATOR_INCREMENT
public static final int OPERATOR_DECREMENT
public static final int OPERATOR_QUESTION
public static final int OPERATOR_COLON
public static final int OPERATOR_DIFF
public static final int COMMENT_TRADITIONAL
public static final int COMMENT_END_OF_LINE
public static final int COMMENT_DOCUMENTATION
public static final int WHITE_SPACE
public static final int ERROR_IDENTIFIER
public static final int ERROR_UNCLOSED_STRING
public static final int ERROR_MALFORMED_STRING
public static final int ERROR_MALFORMED_UNCLOSED_STRING
public static final int ERROR_UNCLOSED_CHARACTER
public static final int ERROR_MALFORMED_CHARACTER
public static final int ERROR_MALFORMED_UNCLOSED_CHARACTER
public static final int ERROR_INTEGER_DECIMIAL_SIZE
public static final int ERROR_INTEGER_OCTAL_SIZE
public static final int ERROR_INTEGER_HEXIDECIMAL_SIZE
public static final int ERROR_LONG_DECIMIAL_SIZE
public static final int ERROR_LONG_OCTAL_SIZE
public static final int ERROR_LONG_HEXIDECIMAL_SIZE
public static final int ERROR_FLOAT_SIZE
public static final int ERROR_DOUBLE_SIZE
public static final int ERROR_FLOAT
public static final int ERROR_UNCLOSED_COMMENT
Constructor Detail |
public PrologCGToken(int ID, java.lang.String contents, int lineNumber, int charBegin, int charEnd)
ID
- the id number of the tokencontents
- A string representing the text of the tokenlineNumber
- the line number of the input on which this token startedcharBegin
- the offset into the input in characters at which this token startedcharEnd
- the offset into the input in characters at which this token endedpublic PrologCGToken(int ID, java.lang.String contents, int lineNumber, int charBegin, int charEnd, int state)
ID
- the id number of the tokencontents
- A string representing the text of the tokenlineNumber
- the line number of the input on which this token startedcharBegin
- the offset into the input in characters at which this token startedcharEnd
- the offset into the input in characters at which this token endedstate
- the state the tokenizer is in after returning this token.Method Detail |
public int getState()
getState
in class Token
public int getID()
getID
in class Token
public java.lang.String getContents()
getContents
in class Token
public int getLineNumber()
getLineNumber
in class Token
public int getCharBegin()
getCharBegin
in class Token
public int getCharEnd()
getCharEnd
in class Token
public boolean isReservedWord()
public boolean isIdentifier()
public boolean isLiteral()
public boolean isSeparator()
public boolean isOperator()
public boolean isComment()
isComment
in class Token
public boolean isWhiteSpace()
isWhiteSpace
in class Token
public boolean isVariable()
public boolean isError()
isError
in class Token
public boolean isJavaMessage()
public java.lang.String getDescription()
getDescription
in class Token
public java.lang.String errorString()
errorString
in class Token
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |