public class PlsqlDriver
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
protected static class |
BaseSqlLayer.Context |
Modifier and Type | Field and Description |
---|---|
protected int |
curToken
The current lexer token.
|
protected int |
errorCount
The number of errors.
|
protected int |
handlerDepth
The exception handler depth.
|
protected int |
lastCheckpoint
The last checkpoint.
|
protected int |
lastEndOffset
The end offset of the previous token.
|
protected int |
lastErrorOffset
The offset of the last error
|
protected oracle.javatools.parser.plsql.syntax.BaseSqlLexer |
lexer
The associated PlsqlLexer.
|
static int |
PTERR_ALTER_ATTR_MODIFY |
static int |
PTERR_ALTER_TYPE |
static int |
PTERR_base
Base value for PTERR_* constants.
|
static int |
PTERR_EXPECTING_IDENTIFIER |
static int |
PTERR_EXPECTING_N |
static int |
PTERR_EXPECTING_STRING |
static int |
PTERR_INTERNAL_ERROR |
static int |
PTERR_INVALID_INTERVAL |
static int |
PTERR_INVALID_PREDICATE |
static int |
PTERR_INVALID_TYPE_DEF |
static int |
PTERR_NOT_IMPLEMENTED_YET |
static int |
PTERR_PARAMETER_STYLE |
static int |
PTERR_PARTITION |
static int |
PTERR_SQLJ_USING |
static int |
PTERR_UNEXPECTED_TOKEN |
static int |
QCERR_EXPECTING_IDENTIFIER |
static int |
QCERR_INVALID_CASE |
static int |
QCERR_INVALID_DBNM |
static int |
QCERR_INVALID_EXPRESSION |
static int |
QCERR_INVALID_HEURISTIC |
static int |
QCERR_INVALID_INTERVAL |
static int |
QCERR_INVALID_JOIN |
static int |
QCERR_INVALID_LOCK_TABLE |
static int |
QCERR_INVALID_PREDICATE |
static int |
QCERR_INVALID_USING |
static int |
QCERR_LISTSIZE_MISMATCH |
static int |
QCERR_MISSING_EXPRESSION |
static int |
QCERR_NO_ALIAS |
static int |
QCERR_NO_CUBE_ROLLUP |
static int |
QCERR_NO_INLINE_VIEW |
static int |
QCERR_NO_LIST_OPERANDS |
static int |
QCERR_NO_SAMPLE |
static int |
QCERR_RELOP_NEED_ANYALL |
static int |
QCERR_SUBQUERY_REQUIRED |
static int |
QCERR_TOO_MANY_OPERANDS |
static int |
QCERR_UNEXPECTED_EOS |
static int |
QCERR_UNKNOWN |
static int |
QCERR_UNRECOGNISED_PIVOT_CLAUSE |
static int |
QCERR_UNRECOGNISED_UNPIVOT_CLAUSE |
protected static oracle.javatools.resource.BundleHelper |
resources |
protected PtnodRoot |
root
The root node of the parse tree.
|
protected SqlDriver |
sql
The associated SqlDriver.
|
protected oracle.javatools.parser.plsql.syntax.PlsqlLayer1.SqlTextBuffer |
sqlTextBuffer
The ReadTextBuffer instance that is given to the SqlDriver.
|
protected AST[] |
stack
The AST stack.
|
protected int |
stackHeight
The depth of the AST stack.
|
protected AST |
stackTop
The top of the AST stack.
|
protected ReadTextBuffer |
textBuffer
The input text buffer.
|
KW_A, KW_ADD, KW_AGENT, KW_AGGREGATE, KW_ALL, KW_ALTER, KW_AND, KW_ANY, KW_ARRAY, KW_AS, KW_ASC, KW_AT, KW_ATTRIBUTE, KW_AUTHID, KW_AVG, KW_base, KW_BEGIN, KW_BETWEEN, KW_BFILE_BASE, KW_BINARY, KW_BLOB_BASE, KW_BLOCK, KW_BODY, KW_BOTH, KW_BOUND, KW_BULK, KW_BY, KW_BYTE, KW_C, KW_CALL, KW_CALLING, KW_CASCADE, KW_CASE, KW_CHAR, KW_CHAR_BASE, KW_CHARACTER, KW_CHARSET, KW_CHARSETFORM, KW_CHARSETID, KW_CHECK, KW_CLOB_BASE, KW_CLOSE, KW_CLUSTER, KW_CLUSTERS, KW_COLAUTH, KW_COLLECT, KW_COLUMNS, KW_COMMENT, KW_COMMIT, KW_COMMITTED, KW_COMPILED, KW_COMPRESS, KW_CONNECT, KW_CONSTANT, KW_CONSTRUCTOR, KW_CONTEXT, KW_CONVERT, KW_COUNT, KW_CRASH, KW_CREATE, KW_CURRENT, KW_CURSOR, KW_CUSTOMDATUM, KW_DANGLING, KW_DATA, KW_DATE, KW_DATE_BASE, KW_DAY, KW_DECIMAL, KW_DECLARE, KW_DEFAULT, KW_DEFINE, KW_DELETE, KW_DESC, KW_DETERMINISTIC, KW_DISTINCT, KW_DOUBLE, KW_DROP, KW_DURATION, KW_ELEMENT, KW_ELSE, KW_ELSIF, KW_EMPTY, KW_END, KW_ESCAPE, KW_EXCEPT, KW_EXCEPTION, KW_EXCEPTIONS, KW_EXCLUSIVE, KW_EXECUTE, KW_EXISTS, KW_EXIT, KW_EXTERNAL, KW_FETCH, KW_FINAL, KW_FIXED, KW_FLOAT, KW_FOR, KW_FORALL, KW_FORCE, KW_FORM, KW_FROM, KW_FUNCTION, KW_GENERAL, KW_GOTO, KW_GRANT, KW_GROUP, KW_HASH, KW_HAVING, KW_HEAP, KW_HIDDEN, KW_HOUR, KW_IDENTIFIED, KW_IF, KW_IMMEDIATE, KW_IN, KW_INCLUDING, KW_INDEX, KW_INDEXES, KW_INDICATOR, KW_INDICES, KW_INFINITE, KW_INSERT, KW_INSTANTIABLE, KW_INT, KW_INTERFACE, KW_INTERSECT, KW_INTERVAL, KW_INTO, KW_INVALIDATE, KW_IS, KW_ISOLATION, KW_JAVA, KW_LANGUAGE, KW_LARGE, KW_LEADING, KW_LENGTH, KW_LEVEL, KW_LIBRARY, KW_LIKE, KW_LIMIT, KW_LIMITED, KW_LOCAL, KW_LOCK, KW_LONG, KW_LOOP, KW_MAP, KW_max, KW_MAX, KW_MAXLEN, KW_MEMBER, KW_MERGE, KW_MIN, KW_MINUS, KW_MINUTE, KW_MOD, KW_MODE, KW_MODIFY, KW_MONTH, KW_MULTISET, KW_NAME, KW_NAN, KW_NATIONAL, KW_NATIVE, KW_NCHAR, KW_NEW, KW_NOCOMPRESS, KW_NOCOPY, KW_NOT, KW_NOWAIT, KW_NULL, KW_NUMBER_BASE, KW_OBJECT, KW_OCICOLL, KW_OCIDATE, KW_OCIDATETIME, KW_OCIDURATION, KW_OCIINTERVAL, KW_OCILOBLOCATOR, KW_OCINUMBER, KW_OCIRAW, KW_OCIREF, KW_OCIREFCURSOR, KW_OCIROWID, KW_OCISTRING, KW_OCITYPE, KW_OF, KW_ON, KW_ONLY, KW_OPAQUE, KW_OPEN, KW_OPERATOR, KW_OPTION, KW_OR, KW_ORACLE, KW_ORADATA, KW_ORDER, KW_ORGANIZATION, KW_ORLANY, KW_ORLVARY, KW_OTHERS, KW_OUT, KW_OVERLAPS, KW_OVERRIDING, KW_PACKAGE, KW_PARALLEL_ENABLE, KW_PARAMETER, KW_PARAMETERS, KW_PARTITION, KW_PASCAL, KW_PIPE, KW_PIPELINED, KW_PRAGMA, KW_PRECISION, KW_PRIOR, KW_PRIVATE, KW_PROCEDURE, KW_PUBLIC, KW_RAISE, KW_RANGE, KW_RAW, KW_READ, KW_RECORD, KW_REF, KW_REFERENCE, KW_REM, KW_REMAINDER, KW_RENAME, KW_REPLACE, KW_RESOURCE, KW_RESULT, KW_RETURN, KW_RETURNING, KW_REVERSE, KW_REVOKE, KW_ROLLBACK, KW_ROW, KW_SAMPLE, KW_SAVE, KW_SAVEPOINT, KW_SB1, KW_SB2, KW_SB4, KW_SECOND, KW_SEGMENT, KW_SELECT, KW_SELF, KW_SEPARATE, KW_SEQUENCE, KW_SERIALIZABLE, KW_SET, KW_SHARE, KW_SHORT, KW_SIZE, KW_SIZE_T, KW_SOME, KW_SPARSE, KW_SQL, KW_SQLCODE, KW_SQLDATA, KW_SQLNAME, KW_SQLSTATE, KW_STANDARD, KW_START, KW_STATIC, KW_STDDEV, KW_STORED, KW_STRING, KW_STRUCT, KW_STYLE, KW_SUBMULTISET, KW_SUBPARTITION, KW_SUBSTITUTABLE, KW_SUBTYPE, KW_SUM, KW_SYNONYM, KW_TABAUTH, KW_TABLE, KW_TDO, KW_THE, KW_THEN, KW_TIME, KW_TIMESTAMP, KW_TIMEZONE_ABBR, KW_TIMEZONE_HOUR, KW_TIMEZONE_MINUTE, KW_TIMEZONE_REGION, KW_TO, KW_TRAILING, KW_TRANSAC, KW_TRANSACTIONAL, KW_TRUSTED, KW_TYPE, KW_UB1, KW_UB2, KW_UB4, KW_UNDER, KW_UNION, KW_UNIQUE, KW_UNSIGNED, KW_UNTRUSTED, KW_UPDATE, KW_USE, KW_USING, KW_VALIST, KW_VALUE, KW_VALUES, KW_VARIABLE, KW_VARIANCE, KW_VARRAY, KW_VARYING, KW_VIEW, KW_VIEWS, KW_VOID, KW_WHEN, KW_WHERE, KW_WHILE, KW_WITH, KW_words, KW_WORK, KW_WRAPPED, KW_WRITE, KW_YEAR, KW_ZONE
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
PTNOD_BLOCK, PTNOD_FMLPART
PTNOD_ADT, PTNOD_ADT_CMPON_OBJECT, PTNOD_ADT_CMPON_SUBPRG, PTNOD_ADTBODY, PTNOD_ADTBODY_SUBPRG, PTNOD_base, PTNOD_C_ARRAY_DEF, PTNOD_CURSOR, PTNOD_ENUM_TY_DEF, PTNOD_ERROR, PTNOD_LITERAL, PTNOD_max, PTNOD_NAME, PTNOD_PKG, PTNOD_RECORD_TY_DEF, PTNOD_REF_CURSOR_TY_DEF, PTNOD_ROOT, PTNOD_SUBPRG, PTNOD_SUBTY_DEF, PTNOD_TABLE_TYPE, PTNOD_TBL_TY_DEF, PTNOD_TY_DEF, PTNOD_TYPE, PTNOD_UNCNSTRNED_ARRAY_DEF, PTNOD_VARIABLE, QCNOD_EXPRESSION
Constructor and Description |
---|
PlsqlDriver() |
Modifier and Type | Method and Description |
---|---|
protected void |
_asn_expr_opt() |
protected void |
_end() |
protected void |
_end(int tk) |
protected void |
adt_prag() |
protected void |
aggr() |
protected void |
all_or_distinct_opt() |
protected AST |
allocateNode(int kind) |
protected void |
array_ty_def() |
protected void |
authid_opt() |
protected void |
basic_decl_item_opt_seq() |
protected void |
begin_exception_handler() |
protected void |
begin_stmt_exc() |
protected void |
call_statement() |
protected void |
charset_csname() |
protected void |
charset_spec_opt() |
protected boolean |
checkpoint() |
protected void |
compilation_unit() |
protected void |
constrt_opt() |
protected void |
datetime_expanded_n() |
protected void |
datetime_link_expanded_n() |
protected void |
dblink() |
protected void |
designator_opt() |
protected void |
designator() |
protected void |
dscr_rng() |
protected void |
end_exception_handler() |
protected void |
error(int code) |
protected void |
error(int code,
java.lang.String message) |
protected void |
errorExpecting(int tk) |
protected void |
errorExpecting(int tk1,
int tk2) |
protected void |
errorUnexpected() |
protected void |
expanded_n() |
protected void |
expr() |
protected void |
finishNode() |
protected void |
fml_part_opt() |
protected void |
form() |
protected void |
identifier_opt() |
protected void |
identifier() |
protected static boolean |
idn(int tk) |
protected void |
internalError() |
protected void |
ips()
Initialize Parsing State
|
protected void |
labeled_block_stmt() |
protected void |
labeled_nonblock_stmt() |
protected void |
labeled_stmt() |
protected void |
link_expanded_n() |
static java.lang.String |
lookupErrorMessage(int code) |
protected boolean |
loop_sql_stmt() |
protected void |
name() |
protected void |
nextToken(int tk)
Require that the current token match the given parameter.
|
protected void |
nextToken(int tk1,
int tk2)
Require that the current token match one of the given parameters.
|
protected boolean |
node(int ty)
Pushes a node of the specified type onto the stack.
|
protected void |
notImplementedYet(java.lang.String message) |
protected void |
object() |
protected void |
optional_alter_arrays() |
protected void |
optional_alter_types() |
protected boolean |
optionalToken(int tk)
If the current token matches the given parameter, consume it and
return true.
|
protected boolean |
optionalToken(int tk1,
int tk2)
If the current token matches one of the given parameters, consume
it and return true.
|
PlsqlRoot |
ph1drv() |
protected void |
pkg() |
protected void |
pop()
Pops a node off the top of the stack.
|
protected void |
prag_opt_seq() |
protected void |
pri() |
protected void |
prm_spec_ty_mk() |
protected void |
restore_context(BaseSqlLayer.Context context)
Restores the saved lexer context.
|
protected void |
rng() |
protected BaseSqlLayer.Context |
save_context()
Saves the current lexer context.
|
void |
setTextBuffer(ReadTextBuffer textBuffer)
Convenience method that calls through to the lexer's setTextBuffer
method.
|
protected void |
sim_expr() |
protected void |
skipToken()
Consumes the current token.
|
protected void |
sort_specification_list() |
protected boolean |
sql_stmt() |
protected void |
subprg() |
protected boolean |
subquery_check() |
protected void |
subty_ind() |
protected void |
tbl_ty_def() |
protected void |
ty_def() |
protected void |
ty_mk() |
protected void |
ty() |
protected SqlDriver sql
protected oracle.javatools.parser.plsql.syntax.PlsqlLayer1.SqlTextBuffer sqlTextBuffer
protected int curToken
protected int lastEndOffset
protected int handlerDepth
protected oracle.javatools.parser.plsql.syntax.BaseSqlLexer lexer
protected ReadTextBuffer textBuffer
protected AST stackTop
protected AST[] stack
protected int stackHeight
protected PtnodRoot root
protected int lastCheckpoint
protected int errorCount
protected int lastErrorOffset
protected static final oracle.javatools.resource.BundleHelper resources
public static final int PTERR_base
public static final int PTERR_ALTER_ATTR_MODIFY
public static final int PTERR_ALTER_TYPE
public static final int PTERR_EXPECTING_IDENTIFIER
public static final int PTERR_EXPECTING_N
public static final int PTERR_EXPECTING_STRING
public static final int PTERR_INTERNAL_ERROR
public static final int PTERR_INVALID_INTERVAL
public static final int PTERR_INVALID_PREDICATE
public static final int PTERR_INVALID_TYPE_DEF
public static final int PTERR_NOT_IMPLEMENTED_YET
public static final int PTERR_PARAMETER_STYLE
public static final int PTERR_PARTITION
public static final int PTERR_SQLJ_USING
public static final int PTERR_UNEXPECTED_TOKEN
public static final int QCERR_EXPECTING_IDENTIFIER
public static final int QCERR_INVALID_CASE
public static final int QCERR_INVALID_DBNM
public static final int QCERR_INVALID_EXPRESSION
public static final int QCERR_INVALID_HEURISTIC
public static final int QCERR_INVALID_INTERVAL
public static final int QCERR_INVALID_JOIN
public static final int QCERR_INVALID_LOCK_TABLE
public static final int QCERR_INVALID_PREDICATE
public static final int QCERR_INVALID_USING
public static final int QCERR_LISTSIZE_MISMATCH
public static final int QCERR_MISSING_EXPRESSION
public static final int QCERR_NO_ALIAS
public static final int QCERR_NO_CUBE_ROLLUP
public static final int QCERR_NO_INLINE_VIEW
public static final int QCERR_NO_LIST_OPERANDS
public static final int QCERR_NO_SAMPLE
public static final int QCERR_RELOP_NEED_ANYALL
public static final int QCERR_SUBQUERY_REQUIRED
public static final int QCERR_TOO_MANY_OPERANDS
public static final int QCERR_UNEXPECTED_EOS
public static final int QCERR_UNKNOWN
public static final int QCERR_UNRECOGNISED_PIVOT_CLAUSE
public static final int QCERR_UNRECOGNISED_UNPIVOT_CLAUSE
public PlsqlRoot ph1drv()
protected final void compilation_unit()
protected final void basic_decl_item_opt_seq()
protected final void _asn_expr_opt()
protected final void form()
protected final void subprg()
protected final void prm_spec_ty_mk()
protected final void fml_part_opt()
protected final void sort_specification_list()
protected final void pkg()
protected final void ty()
protected final void object()
protected final void optional_alter_arrays()
protected final void optional_alter_types()
protected final void begin_stmt_exc()
protected final void _end()
protected final void _end(int tk)
protected final void labeled_stmt()
protected final void labeled_block_stmt()
protected final void labeled_nonblock_stmt()
protected final void call_statement()
protected final void expr()
protected final void sim_expr()
protected final void pri()
protected final void name()
protected final void aggr()
protected final void all_or_distinct_opt()
protected final void dscr_rng()
protected final void rng()
protected final boolean subquery_check()
protected final void ty_def()
protected final void ty_mk()
protected final void array_ty_def()
protected final void tbl_ty_def()
protected final void charset_spec_opt()
protected final void subty_ind()
protected final void constrt_opt()
protected void errorExpecting(int tk)
protected void errorExpecting(int tk1, int tk2)
protected final void prag_opt_seq()
protected final void adt_prag()
protected final void authid_opt()
protected final void identifier()
protected final void identifier_opt()
protected final void designator()
protected final void designator_opt()
protected final void expanded_n()
protected final void link_expanded_n()
protected final void datetime_expanded_n()
protected final void datetime_link_expanded_n()
protected final void dblink()
protected final void charset_csname()
protected static boolean idn(int tk)
protected final boolean loop_sql_stmt()
protected final boolean sql_stmt()
protected AST allocateNode(int kind)
protected void finishNode()
protected void ips()
protected BaseSqlLayer.Context save_context()
protected void restore_context(BaseSqlLayer.Context context)
public void setTextBuffer(ReadTextBuffer textBuffer)
protected final void nextToken(int tk)
protected final void nextToken(int tk1, int tk2)
protected final boolean optionalToken(int tk)
protected final boolean optionalToken(int tk1, int tk2)
protected final void skipToken()
protected final boolean node(int ty)
protected final void pop()
protected final boolean checkpoint()
protected final void begin_exception_handler()
protected final void end_exception_handler()
protected void notImplementedYet(java.lang.String message)
protected void internalError()
protected void error(int code)
protected void error(int code, java.lang.String message)
protected void errorUnexpected()
public static java.lang.String lookupErrorMessage(int code)