public class PlsqlLexer extends AbstractLexer implements PlsqlTokens
AbstractLexer.DefaultLexerTokencurrentPos, textBufferTK_ASG, TK_ASSOC, TK_AT, TK_ATTRIBUTE, TK_BOOLEAN_LITERAL, TK_CHAR_LITERAL, TK_COLON, TK_COMMA, TK_CONCAT, TK_DIV, TK_DOT, TK_EQ, TK_EXPONENT, TK_FLOAT_LITERAL, TK_GE, TK_GT, TK_IDENTIFIER, TK_INT_LITERAL, TK_INVALID, TK_LE, TK_LLABEL, TK_LPAREN, TK_LT, TK_MINUS, TK_MUL, TK_MULTI_COMMENT, TK_NE, TK_NULL_LITERAL, TK_OUTERJOIN, TK_PLUS, TK_QUOTED_IDENTIFIER, TK_RANGE, TK_RLABEL, TK_RPAREN, TK_SEMI, TK_SINGLE_COMMENT, TKKW_ALL, TKKW_ALTER, TKKW_AND, TKKW_ANY, TKKW_ARRAY, TKKW_AS, TKKW_ASC, TKKW_AT, TKKW_AUTHID, TKKW_AVG, TKKW_BEGIN, TKKW_BETWEEN, TKKW_BFILE, TKKW_BINARY_INTEGER, TKKW_BLOB, TKKW_BODY, TKKW_BOOLEAN, TKKW_BULK, TKKW_BY, TKKW_CASE, TKKW_CHAR, TKKW_CHAR_BASE, TKKW_CHECK, TKKW_CLOB, TKKW_CLOSE, TKKW_CLUSTER, TKKW_COALESCE, TKKW_COLLECT, TKKW_COMMENT, TKKW_COMMIT, TKKW_COMPRESS, TKKW_CONNECT, TKKW_CONSTANT, TKKW_CREATE, TKKW_CURRENT, TKKW_CURRVAL, TKKW_CURSOR, TKKW_DATE, TKKW_DAY, TKKW_DEC, TKKW_DECIMAL, TKKW_DECLARE, TKKW_DEFAULT, TKKW_DELETE, TKKW_DESC, TKKW_DISTINCT, TKKW_DO, TKKW_DROP, TKKW_ELSE, TKKW_ELSIF, TKKW_END, TKKW_EXCEPTION, TKKW_EXCLUSIVE, TKKW_EXECUTE, TKKW_EXISTS, TKKW_EXIT, TKKW_EXTENDS, TKKW_EXTRACT, TKKW_FALSE, TKKW_FETCH, TKKW_FLOAT, TKKW_FOR, TKKW_FORALL, TKKW_FROM, TKKW_FUNCTION, TKKW_GOTO, TKKW_GROUP, TKKW_HAVING, TKKW_HEAP, TKKW_HOUR, TKKW_IF, TKKW_IMMEDIATE, TKKW_IN, TKKW_INDEX, TKKW_INDICATOR, TKKW_INSERT, TKKW_INTEGER, TKKW_INTERFACE, TKKW_INTERSECT, TKKW_INTERVAL, TKKW_INTO, TKKW_IS, TKKW_ISOLATION, TKKW_JAVA, TKKW_LEVEL, TKKW_LIKE, TKKW_LIMITED, TKKW_LOCK, TKKW_LONG, TKKW_LOOP, TKKW_MAX, TKKW_MIN, TKKW_MINUS, TKKW_MINUTE, TKKW_MLSLABEL, TKKW_MOD, TKKW_MODE, TKKW_MONTH, TKKW_NATURAL, TKKW_NATURALN, TKKW_NCHAR, TKKW_NCLOB, TKKW_NEW, TKKW_NEXTVAL, TKKW_NOCOPY, TKKW_NOT, TKKW_NOWAIT, TKKW_NULL, TKKW_NULLIF, TKKW_NUMBER, TKKW_NUMBER_BASE, TKKW_NUMERIC, TKKW_NVARCHAR2, TKKW_OCIROWID, TKKW_OF, TKKW_ON, TKKW_OPAQUE, TKKW_OPEN, TKKW_OPERATOR, TKKW_OPTION, TKKW_OR, TKKW_ORDER, TKKW_ORGANIZATION, TKKW_OTHERS, TKKW_OUT, TKKW_PACKAGE, TKKW_PARTITION, TKKW_PCTFREE, TKKW_PLS_INTEGER, TKKW_POSITIVE, TKKW_POSITIVEN, TKKW_PRAGMA, TKKW_PRIOR, TKKW_PRIVATE, TKKW_PROCEDURE, TKKW_PUBLIC, TKKW_RAISE, TKKW_RANGE, TKKW_RAW, TKKW_REAL, TKKW_RECORD, TKKW_REF, TKKW_RELEASE, TKKW_RETURN, TKKW_REVERSE, TKKW_ROLLBACK, TKKW_ROW, TKKW_ROWID, TKKW_ROWNUM, TKKW_ROWTYPE, TKKW_SAVEPOINT, TKKW_SECOND, TKKW_SELECT, TKKW_SEPARATE, TKKW_SET, TKKW_SHARE, TKKW_SMALLINT, TKKW_SPACE, TKKW_SQL, TKKW_SQLCODE, TKKW_SQLERRM, TKKW_START, TKKW_STDDEV, TKKW_SUBTYPE, TKKW_SUCCESSFUL, TKKW_SUM, TKKW_SYNONYM, TKKW_SYSDATE, TKKW_TABLE, TKKW_THEN, TKKW_TIME, TKKW_TIMESTAMP, TKKW_TIMEZONE_ABBR, TKKW_TIMEZONE_HOUR, TKKW_TIMEZONE_MINUTE, TKKW_TIMEZONE_REGION, TKKW_TO, TKKW_TRIGGER, TKKW_TRUE, TKKW_TYPE, TKKW_UID, TKKW_UNION, TKKW_UNIQUE, TKKW_UPDATE, TKKW_USE, TKKW_USER, TKKW_VALIDATE, TKKW_VALUES, TKKW_VARCHAR, TKKW_VARCHAR2, TKKW_VARIANCE, TKKW_VIEW, TKKW_WHEN, TKKW_WHENEVER, TKKW_WHERE, TKKW_WHILE, TKKW_WITH, TKKW_WORK, TKKW_WRITE, TKKW_YEAR, TKKW_ZONETK_EOF, TK_NOT_FOUND| Constructor and Description |
|---|
PlsqlLexer()
Constructs a default
PlsqlLexer with a starting
position of 0. |
| Modifier and Type | Method and Description |
|---|---|
void |
backup()
Unlexes the last found token.
|
static boolean |
isDecimalDigit(char digit)
Utility routine to check whether the given digit is a decimal
digit.
|
int |
lex(LexerToken lexedToken)
Scans the text buffer at the current position and returns the
token that was found.
|
void |
setPosition(int offset)
Sets the current lex (read) position to the given offset in the
buffer.
|
void |
setSkipComments(boolean skipComments)
Sets whether the
PlsqlLexer should generate tokens
for Java comments. |
static java.lang.String |
tokenToString(int token) |
static java.lang.String |
tokenToText(int token)
Utility routine to map the token to the original text (if
retrievable) of the token (for debug printing.)
|
createLexerToken, getTextBuffer, setTextBufferpublic PlsqlLexer()
PlsqlLexer with a starting
position of 0. Clients must call setTextBuffer() to
initialize the text buffer used for the Lexer. To start lexing
from an offset other than 0, call setPosition().public void setSkipComments(boolean skipComments)
PlsqlLexer should generate tokens
for Java comments.skipComments - true to ignore comments in token generationpublic int lex(LexerToken lexedToken)
lexedToken instance passed in to the
call.lex in interface Lexerlex in class AbstractLexerlexedToken - the instance passed in where token info is storedlexedToken.getToken() (for convenience)public void backup()
lex()
will return the last token and offset information found.backup in interface Lexerbackup in class AbstractLexerpublic void setPosition(int offset)
setPosition in interface LexersetPosition in class AbstractLexeroffset - the offset for the next lex() operation.public static boolean isDecimalDigit(char digit)
digit - the digit to checkpublic static java.lang.String tokenToString(int token)
public static java.lang.String tokenToText(int token)
token - the token to map