|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.devaki.nextobjects.ui.editor.syntax.Token org.devaki.nextobjects.ui.editor.syntax.SqlToken
Description: A JavaToken is a token that is returned by a lexer that is lexing a java 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 inut at which it ended.
Fields inherited from class org.devaki.nextobjects.ui.editor.syntax.Token |
INITIAL_STATE, UNDEFINED_STATE |
Constructor Summary | |
SqlToken(int ID,
java.lang.String contents,
int lineNumber,
int charBegin,
int charEnd)
Create a new token. |
|
SqlToken(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 identidefer. |
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 |
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_ADD
public static final int RESERVED_WORD_ALTER
public static final int RESERVED_WORD_AND
public static final int RESERVED_WORD_BEGIN
public static final int RESERVED_WORD_CASCADE
public static final int RESERVED_WORD_CHAR
public static final int RESERVED_WORD_CLOSE
public static final int RESERVED_WORD_CONSTRAINT
public static final int RESERVED_WORD_CONSTRAINTS
public static final int RESERVED_WORD_CREATE
public static final int RESERVED_WORD_CURSOR
public static final int RESERVED_WORD_DATE
public static final int RESERVED_WORD_DATETIME
public static final int RESERVED_WORD_DEALLOCATE
public static final int RESERVED_WORD_DECIMAL
public static final int RESERVED_WORD_DECLARE
public static final int RESERVED_WORD_DEFAULT
public static final int RESERVED_WORD_DROP
public static final int RESERVED_WORD_END
public static final int RESERVED_WORD_EXEC
public static final int RESERVED_WORD_EXISTS
public static final int RESERVED_WORD_FETCH
public static final int RESERVED_WORD_FOR
public static final int RESERVED_WORD_FOREIGN
public static final int RESERVED_WORD_FROM
public static final int RESERVED_WORD_IF
public static final int RESERVED_WORD_INDEX
public static final int RESERVED_WORD_INTO
public static final int RESERVED_WORD_KEY
public static final int RESERVED_WORD_NEXT
public static final int RESERVED_WORD_NOT
public static final int RESERVED_WORD_NULL
public static final int RESERVED_WORD_NUMBER
public static final int RESERVED_WORD_NUMERIC
public static final int RESERVED_WORD_NVARCHAR
public static final int RESERVED_WORD_OPEN
public static final int RESERVED_WORD_PRIMARY
public static final int RESERVED_WORD_REFERENCES
public static final int RESERVED_WORD_SELECT
public static final int RESERVED_WORD_TABLE
public static final int RESERVED_WORD_USING
public static final int RESERVED_WORD_VARCHAR
public static final int RESERVED_WORD_VARCHAR2
public static final int RESERVED_WORD_WHERE
public static final int RESERVED_WORD_WHILE
public static final int IDENTIFIER
public static final int LITERAL_INTEGER_DECIMAL
public static final int LITERAL_CHARACTER
public static final int LITERAL_STRING_1
public static final int LITERAL_STRING_2
public static final int SEPARATOR_LPAREN
public static final int SEPARATOR_RPAREN
public static final int SEPARATOR_SEMICOLON
public static final int SEPARATOR_COMMA
public static final int SEPARATOR_PERIOD
public static final int OPERATOR_EQUAL
public static final int OPERATOR_GREATER_THAN
public static final int OPERATOR_LESS_THAN
public static final int OPERATOR_DIFFERENT
public static final int OPERATOR_ADD
public static final int OPERATOR_SUBSTRACT
public static final int OPERATOR_ASSIGN
public static final int COMMENT_1
public static final int COMMENT_2
public static final int COMMENT_3
public static final int WHITE_SPACE
Constructor Detail |
public SqlToken(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 SqlToken(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 isError()
isError
in class Token
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 |