Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.javatools.parser.plsql.old
Class PlsqlParser

java.lang.Object
  extended by oracle.javatools.parser.plsql.old.PlsqlParser


public class PlsqlParser
extends java.lang.Object

Entrypoint into the Plsql parser. In this preliminary version, you can only parse full Plsql files (i.e. no expression parsing) and it only parses procedure/function in the root, local variables in the block declarations, and for loops in the statements.


Nested Class Summary
static class PlsqlParser.ParsingOptions
          ParsingOptions is an encapsulation of the various parsing options available in the PlsqlParser.

 

Field Summary
static int DEPTH_DECLARATIONS
          Parse depth.
static int DEPTH_FULL
          Parse depth.
static boolean ERRORS_CHOKE
          Error handling.
static boolean ERRORS_REPORT
          Error handling.
static int INPUT_EXPR
          Input type.
static int INPUT_PLSQL_FILE
          Input type.

 

Constructor Summary
PlsqlParser()
           

 

Method Summary
static RootSymbol parse(ReadTextBuffer buffer)
          Parses according to default parsing options.
static ErrorReporter parse(ReadTextBuffer buffer, PlsqlParser.ParsingOptions options)
          Parses according to the specified parsing options.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ERRORS_CHOKE

public static final boolean ERRORS_CHOKE
Error handling. If there are any syntax errors, the parser will return null. Otherwise, the parser will return a well-formed parse tree.
See Also:
Constant Field Values

ERRORS_REPORT

public static final boolean ERRORS_REPORT
Error handling. If there are any syntax errors, the parser will generate error Strings and generate as much of the parse tree as possible. The client will be able to retrieve the array of error Strings from the returned parse tree JavaSymbol. If there are any errors, it is almost guaranteed the tree will NOT be well-formed. In rare cases, the parser may simply return null.
See Also:
Constant Field Values

INPUT_PLSQL_FILE

public static final int INPUT_PLSQL_FILE
Input type. The input is a Plsql file. The parser will return a RootSymbol.
See Also:
Constant Field Values

INPUT_EXPR

public static final int INPUT_EXPR
Input type. The input is an expression. The parser will return a ExpressionSymbol.
See Also:
Constant Field Values

DEPTH_DECLARATIONS

public static final int DEPTH_DECLARATIONS
Parse depth. Parses for functions, procedures, packages and package bodies. Within each type of global declaration, you'll get type declarations and local variable declarations. You'll also get all the various control statements in the code blocks: if, loop, while, and for. You'll get all nested blocks so that you can find all local variables in the Plsql file. No expression parsing is done and next to no sql parsing is done.
See Also:
Constant Field Values

DEPTH_FULL

public static final int DEPTH_FULL
Parse depth. Fully parses the input.
See Also:
Constant Field Values

Constructor Detail

PlsqlParser

public PlsqlParser()

Method Detail

parse

public static RootSymbol parse(ReadTextBuffer buffer)
Parses according to default parsing options.

parse

public static ErrorReporter parse(ReadTextBuffer buffer,
                                  PlsqlParser.ParsingOptions options)
Parses according to the specified parsing options. May or may not return null according to the ParsingOptions.reportErrors option. Returns either a RootSymbol or an ExpressionSymbol.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.