|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.parser.AbstractLexer oracle.javatools.parser.plsql.syntax.SqlPlsqlLexer
public class SqlPlsqlLexer
The SqlPlsqlLexer is used by the code editor only to highlight both the sql and plsql keywords.
Nested Class Summary | |
---|---|
protected static class |
BaseSqlLexer.Context
|
Nested classes/interfaces inherited from class oracle.javatools.parser.AbstractLexer |
---|
AbstractLexer.DefaultLexerToken |
Field Summary | |
---|---|
protected static int |
CONTEXT_SIZE
The number of elements in the int[] context. |
protected int |
endOffset
The ending offset of the last token found. |
protected int |
hash
If lastToken is TK_IDENTIFIER or is in the keywordTable, then this will be the token's hash value. |
static int |
KW_base
|
protected int |
lastToken
The last token found from lex() operation. |
protected int |
startOffset
The starting offset of the last token found. |
protected static int |
TK_NOT_FOUND
To resolve compiler ambiguity. |
Fields inherited from class oracle.javatools.parser.AbstractLexer |
---|
currentPos, textBuffer |
Fields inherited from interface oracle.javatools.parser.plsql.SqlTokens |
---|
OP_AMPERSAND, OP_ARROW, OP_ASSIGN, OP_ATSIGN, OP_base, OP_CAT, OP_COLON, OP_COMMA, OP_DBLDOT, OP_DOT, OP_ELLIPSIS, OP_EQUAL, OP_EXP, OP_GREATER, OP_GTEQL, OP_L_LBL, OP_LBRKT, OP_LESS, OP_LPAREN, OP_LTEQ, OP_max, OP_MINUS, OP_NOTEQL1, OP_NOTEQL2, OP_NOTEQL3, OP_NOTEQL4, OP_OR, OP_OUTERJOIN, OP_PERCENT, OP_PLUS, OP_R_LBL, OP_RBRKT, OP_RPAREN, OP_SEMICLN, OP_SHRIEK, OP_SLASH, OP_STAR, OP_words, TK_BIND_VAR, TK_EOS, TK_IDENTIFIER, TK_invalid, TK_INVALID, TK_MULTI_COMMENT, TK_N, TK_QUOTED_IDENTIFIER, TK_SINGLE_COMMENT, TK_STRING |
Fields inherited from interface oracle.javatools.parser.Lexer |
---|
TK_EOF |
Constructor Summary | |
---|---|
SqlPlsqlLexer()
Constructs a default SqlPlsqlLexer with a starting
position of 0. |
Method Summary | |
---|---|
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. |
protected void |
restore_context(BaseSqlLexer.Context context)
|
protected void |
save_context(BaseSqlLexer.Context context)
|
void |
setSkipComments(boolean skipComments)
Sets whether the PlsqlLexer should generate tokens
for Java comments. |
protected void |
skipQuotedStringLiteral()
Skip an alternatively quoted string literal, syntax introduced in Database 10gR1. |
protected void |
skipStringLiteral()
Utility routine which scans through the text buffer to find the end of the string literal. |
Methods inherited from class oracle.javatools.parser.AbstractLexer |
---|
createLexerToken, getTextBuffer, setPosition, setTextBuffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int KW_base
protected static final int CONTEXT_SIZE
protected static final int TK_NOT_FOUND
protected int lastToken
lex()
operation.
protected int startOffset
protected int endOffset
protected int hash
Constructor Detail |
---|
public SqlPlsqlLexer()
SqlPlsqlLexer
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()
.
Method Detail |
---|
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 Lexer
lex
in class AbstractLexer
lexedToken
- the instance passed in where token info is stored
lexedToken.getToken()
(for convenience)public void backup()
lex()
will return the last token and offset information found.
backup
in interface Lexer
backup
in class AbstractLexer
protected final void skipStringLiteral()
protected final void skipQuotedStringLiteral()
public static boolean isDecimalDigit(char digit)
digit
- the digit to checkprotected void save_context(BaseSqlLexer.Context context)
protected void restore_context(BaseSqlLexer.Context context)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.6.0) E13403-07 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |