Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. PLSQL.jj */
/*@egen*//* Copyright (C) 2002-2012 Albert Tumanov
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* Add support for SQL_MACRO
*
* Arjen Duursma 06/2024
*====================================================================
* Add support for MERGE (INTO) statement
* Add support Error Logging for INSERT, UPDATE, DELETE
* Add support for exception handlers in compound triggers,
* Allow multiple exception handlers. Parse DeclarativeSection
* correctly in compound triggers.
*
* Andreas Dangel 06/2024
*====================================================================
* Add support for Select statement within OPEN FOR Statements
*
* Andreas Dangel 09/2021
*====================================================================
* Add support for XMLROOT, improve ExtractExpression to support xml
*
* Piotr Szymanski 03/2020
*====================================================================
* Add basic support for with clause in select statements
*
* Andreas Dangel 09/2019
*====================================================================
* Add support for SELECT with FOR UPDATE OF
*
* Piotr Szymanski 08/2019
*====================================================================
* Various fixes for expression lists, join clauses, case expression
*
* Hugo Araya Nash 06/2019
*====================================================================
* Various fixes for INSERT INTO with records, implicit cursor attributes
* and trim expression.
*
* Hugo Araya Nash 05/2019
*====================================================================
* Added support for XMLTABLE, XMLEXISTS, XMLCAST, XMLQUERY, CAST, XMLFOREST
* and XMLELEMENT
*
* Andreas Dangel 03/2019
*====================================================================
* More complete support for UPDATE statements and subqueries and hierarchical
* queries in SELECT statements.
* Added support for analytic functions such as LISTAGG.
* Conditions in WHERE clauses support now REGEX_LIKE and multiset conditions.
*
* Andreas Dangel 02/2019
*====================================================================
* Added support for TableCollectionExpressions
*
* Andreas Dangel 01/2019
*====================================================================
* Added support for DELETE Statements
* Added support for UPDATE Statements
* Fully parse the select statement in CursorForLoops.
*
* Andreas Dangel 09/2018
*====================================================================
* Added support for OrderBy and RowLimiting clauses for SELECT statements
* Removed FROM from the RelationalExpression
* Support QueryPartitionClause
* Support GroupByClause
*
* Andreas Dangel 08/2018
*====================================================================
* Added more complete support for CREATE TABLE
* Added support for SELECT INTO statement
* Avoiding deep AST for *Expression nodes
* Added ASTCursorForLoop and ASTSelectStatement
*
* Andreas Dangel 07/2018
*====================================================================
* Added ASTIsOfTypeCondition node, added support for USING IN|OUT|IN OUT
* See PMD Bug #1520
*
* Andreas Dangel 11/2016
*====================================================================
* Adjusted ProgramUnit() to allow Pragma(), even though this is not
* valid syntax. See PMD Bug #1527.
*
* Andreas Dangel 11/2016
*/
/**
* Added ASTIsNullCondition node
*
* Sergey Yanzin 11/2016
*/
options {
DEBUG_PARSER = false;
DEBUG_TOKEN_MANAGER = false;
DEBUG_LOOKAHEAD = false;
IGNORE_CASE = true;
STATIC = false;
LOOKAHEAD= 1;
// set the ambiguity checks to higher values, if you need more extensive checks of the grammar
// this however make the parser generation very slow, so should only be done once after
// modifying the grammar to make sure there are no grammar errors.
// Default value is 2.
CHOICE_AMBIGUITY_CHECK = 2;
OTHER_AMBIGUITY_CHECK = 1;
ERROR_REPORTING = true;
JAVA_UNICODE_ESCAPE = false;
UNICODE_INPUT = true;
USER_TOKEN_MANAGER = false;
USER_CHAR_STREAM = true;
BUILD_PARSER = true;
BUILD_TOKEN_MANAGER = true;
SANITY_CHECK = true;
CACHE_TOKENS = true;
}
PARSER_BEGIN(PLSQLParserImpl)
/* Copyright (C) 2002 Albert Tumanov
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package net.sourceforge.pmd.lang.plsql.ast;
import net.sourceforge.pmd.lang.document.Chars;
import net.sourceforge.pmd.lang.plsql.ast.internal.ParsingExclusion;
import java.util.ArrayList;
import java.util.List;
/**
* @deprecated Since 7.3.0. PLSQLParserImpl should have been package private because this is an implementation class
* that should not be used directly.
*/
@Deprecated
public class PLSQLParserImpl/*@bgen(jjtree)*/implements PLSQLParserImplTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
protected JJTPLSQLParserImplState jjtree = new JJTPLSQLParserImplState();
/*@egen*/
/**
Return canonical version of the Oracle
*/
static String canonicalName(String name)
{
StringBuilder s = null ;
if (null == name) {
return name;
}
else if (-1 == name.indexOf('"') )
{
name = name.toUpperCase();
s = new StringBuilder(name.trim());
}
else
{
StringBuilder oldString = new StringBuilder( name.trim().length());
s = new StringBuilder(name.trim());
boolean quotedCharacter = false ;
for (int i=0; i
* Usage: LOOKAHEAD({isKeyword("WAIT")}) KEYWORD("WAIT")
*/
private boolean isKeyword(String keyword) {
return getToken(1).kind == IDENTIFIER
&& getToken(1).getImage().equalsIgnoreCase(keyword)
// quoted identifiers are excluded
&& getToken(1).getText().charAt(0) != '"';
}
}
PARSER_END(PLSQLParserImpl)
TOKEN_MGR_DECLS : {
List exclusions = new ArrayList();
}
// add names to SINGLE CHARACTER tokens
// multiple character operators are sequences of tokens.
TOKEN: {
< LPAREN: "(" >
| < RPAREN: ")" >
| < LBRACE: "{" >
| < RBRACE: "}" >
| < LBRACKET: "[" >
| < RBRACKET: "]" >
| < SEMICOLON: ";" >
| < COMMA: "," >
| < DOT: "." >
| < AROBASE: "@" >
| < ASSIGN: "=" >
| < LT: "<" >
| < BANG: "!" >
| < TILDE: "~" >
| < HOOK: "?" >
| < COLON: ":" >
| < PLUSSIGN: "+" >
| < MINUSSIGN: "-" >
| < STAR: "*" >
| < SLASH: "/" >
| < BIT_AND: "&" >
| < BIT_OR: "|" >
| < XOR: "^" >
| < REM: "%" >
}
/**
* 2006-05-22 - Matthias Hendler - Added parsing of triggers and global functions/procedures
* Refactored printing of custom tags into the XML/DOM.
* Custom tags are language independent. Reserved tags are linked
* to the documented language like RETURN, PARAM and THROWS.
*/
/**
* 2006-05-22 - Matthias Hendler - added globalBody()
*/
ASTInput Input() :
{/*@bgen(jjtree) Input */
ASTInput jjtn000 = new ASTInput(JJTINPUT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
token_source.exclusions.clear();
}
{/*@bgen(jjtree) Input */
try {
/*@egen*/
// SRT 2011-04-17 This syntax breaks the parser when fields of record.attach* are referenced (attachLibrary())*
(
(LOOKAHEAD(7) PackageSpecification()
| LOOKAHEAD(7) PackageBody()
| LOOKAHEAD(6) TypeSpecification()
| LOOKAHEAD(6) Table()
| LOOKAHEAD(6) View()
| LOOKAHEAD(6) TriggerUnit()
| LOOKAHEAD(6) AlterTrigger()
| LOOKAHEAD(6) Synonym()
| LOOKAHEAD(6) Directory()
| LOOKAHEAD(6) DatabaseLink()
| LOOKAHEAD(6) Global()
| (LOOKAHEAD(6) DDLCommand())+
| LOOKAHEAD(2) SqlPlusCommand()
| UpdateStatement() [";"]
| DeleteStatement() [";"]
| InsertStatement() [";"]
| SelectStatement() [";"]
| MergeStatement() [";"]
|(|||
|) ReadPastNextOccurrence(";") //Ignore SQL statements in scripts
)
("/")*
)*
/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{
List exclusions = token_source.exclusions;
if (exclusions != null) {
// System.err.println("ParsingExclusions:");
for (ParsingExclusion ex : exclusions) {
// System.err.print(" Lines " + ex.getBeginLine() + " - " + ex.getEndLine());
// if (ex.getReason() != null) {
// System.err.println(": " + ex.getReason());
// } else {
// System.err.println("");
// }
jjtn000.addExcludedLineRange(ex.getBeginLine(), ex.getEndLine());
}
}
return jjtn000 ;
}/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTDDLCommand DDLCommand() :
{/*@bgen(jjtree) DDLCommand */
ASTDDLCommand jjtn000 = new ASTDDLCommand(JJTDDLCOMMAND);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) DDLCommand */
try {
/*@egen*/
(
(
LOOKAHEAD({isKeyword("COMMENT")})
simpleNode = Comment()
)
|
(
simpleNode = DDLEvent()
ReadPastNextOccurrence(";")
)
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/*
* See https://docs.oracle.com/en/database/oracle/oracle-database/21/sqpug/SQL-Plus-reference.html#GUID-C3D4A718-56AD-4872-ADFF-A216FF70EDF2
*/
ASTSqlPlusCommand SqlPlusCommand() :
{/*@bgen(jjtree) SqlPlusCommand */
ASTSqlPlusCommand jjtn000 = new ASTSqlPlusCommand(JJTSQLPLUSCOMMAND);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
StringBuilder sb = new StringBuilder();
}
{/*@bgen(jjtree) SqlPlusCommand */
try {
/*@egen*/
(
// e.g. SHOW ERRORS, GRANT EXECUTE ON ... TO ...
// SQLPLUS commands
( "@@" ( <_CHARACTER> | | ) *
| "@" ( <_CHARACTER> | | ) *
| LOOKAHEAD({isKeyword("ACCEPT")}) KEYWORD("ACCEPT")
| LOOKAHEAD({isKeyword("ACC")}) KEYWORD("ACC")
| LOOKAHEAD({isKeyword("ARCHIVE")}) KEYWORD("ARCHIVE") {sb.append(token.getImage()).append(' ');} "LOG" {sb.append(token.getImage()).append(' ');} KEYWORD("LIST")
|
| LOOKAHEAD({isKeyword("BREAK")}) KEYWORD("BREAK")
| LOOKAHEAD({isKeyword("BTITLE")}) KEYWORD("BTITLE")
| LOOKAHEAD({isKeyword("CLEAR")}) KEYWORD("CLEAR")
|
| LOOKAHEAD({isKeyword("COL")}) KEYWORD("COL")
| LOOKAHEAD({isKeyword("COMPUTE")}) KEYWORD("COMPUTE")
| LOOKAHEAD({isKeyword("COMP")}) KEYWORD("COMP")
|
| LOOKAHEAD({isKeyword("CONN")}) KEYWORD("CONN")
| LOOKAHEAD({isKeyword("COPY")}) KEYWORD("COPY")
| LOOKAHEAD({isKeyword("DEFINE")}) KEYWORD("DEFINE")
| LOOKAHEAD({isKeyword("DEF")}) KEYWORD("DEF")
| LOOKAHEAD({isKeyword("DESCRIBE")}) KEYWORD("DESCRIBE")
| LOOKAHEAD({isKeyword("DESCR")}) KEYWORD("DESCR")
| LOOKAHEAD({isKeyword("DESC")}) KEYWORD("DESC")
| LOOKAHEAD({isKeyword("DISCONNECT")}) KEYWORD("DISCONNECT")
| LOOKAHEAD({isKeyword("DISC")}) KEYWORD("DISC")
|
| LOOKAHEAD({isKeyword("EXEC")}) KEYWORD("EXEC")
|
| LOOKAHEAD({isKeyword("HOST")}) KEYWORD("HOST") ( <_CHARACTER> | | ) *
| "$" ( <_CHARACTER> | | ) * // only works with a blank after the dollar
| "!" ( <_CHARACTER> | | ) * // only works with a blank after the exclamation mark
// These characters are platform-specific, anyway...
| LOOKAHEAD({isKeyword("INPUT")}) KEYWORD("INPUT")
| LOOKAHEAD({isKeyword("PASSWORD")}) KEYWORD("PASSWORD")
| LOOKAHEAD({isKeyword("PASSW")}) KEYWORD("PASSW")
| LOOKAHEAD({isKeyword("PAUSE")}) KEYWORD("PAUSE")
| LOOKAHEAD({isKeyword("PRINT")}) KEYWORD("PRINT")
| LOOKAHEAD({isKeyword("PROMPT")}) KEYWORD("PROMPT") ( <_CHARACTER> | | ) *
| LOOKAHEAD({isKeyword("QUIT")}) KEYWORD("QUIT")
| LOOKAHEAD({isKeyword("RECOVER")}) KEYWORD("RECOVER")
| LOOKAHEAD({isKeyword("REMARK")}) KEYWORD("REMARK") ( <_CHARACTER> | | ) *
| LOOKAHEAD({isKeyword("REM")}) KEYWORD("REM") ( <_CHARACTER> | | ) *
|
| LOOKAHEAD({isKeyword("SHOW")}) KEYWORD("SHOW")
| LOOKAHEAD({isKeyword("SHO")}) KEYWORD("SHO")
|
| LOOKAHEAD({isKeyword("SPOOL")}) KEYWORD("SPOOL")
| ( <_CHARACTER> | | ) *
|
| LOOKAHEAD({isKeyword("STORE")}) KEYWORD("STORE")
| LOOKAHEAD({isKeyword("TIMING")}) KEYWORD("TIMING")
| LOOKAHEAD({isKeyword("TTITLE")}) KEYWORD("TTITLE")
| LOOKAHEAD({isKeyword("UNDEFINE")}) KEYWORD("UNDEFINE")
| LOOKAHEAD({isKeyword("VARIABLE")}) KEYWORD("VARIABLE")
| LOOKAHEAD({isKeyword("VAR")}) KEYWORD("VAR")
| LOOKAHEAD({isKeyword("WHENEVER")}) KEYWORD("WHENEVER")
// XQUERY is not yet supported, because it is not a single-line command
// It should be handled as unknown, skipping to the next stand-alone "/".
// DDL that might be encountered
| LOOKAHEAD({isKeyword("COMMENT")}) KEYWORD("COMMENT")
|
|
|
// Attach Library
| "."
)
{
sb.append(token.getImage()) ; sb.append(" ") ; sb.append(Read2NextTokenOccurrence(EOL)) ;
}
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(sb.toString()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* All global definitions of triggers, functions and procedures are evaluated here.
* Every occurrence goes under a new PACKAGE-Node in the XML document.
* This happens, cause a global "block" does not have a definied start and end token
* like a package specification or a package body.
* Thats why every construct is handled like a new part of the global package.
* To overcome this problem, I could use an infinity lookahead - which should solve the problem
* and slow down the whole parsing.
* Another idea would be to lookahead the next tokens and decide wether they belong to a package definition or not.
* Then I could decide to stay in this global parsing state. By now lookahead gives the parser a hint to
* choose the correct way on a given base. So we can't negate it easily.
* On the other hand I could also hold the global state in a global variable.
* But this does not seems the correct way to solve the problem, I think.
*
* 2006-05-17 - Matthias Hendler - added
*/
ASTGlobal Global() :
{/*@bgen(jjtree) Global */
ASTGlobal jjtn000 = new ASTGlobal(JJTGLOBAL);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
}
{/*@bgen(jjtree) Global */
try {
/*@egen*/
/*
Remove triggers from global processing because their schema may be defined in the trigger code itself
Still wrap the trigger in a fake package but make the package name dependent on the actual schema
defaulting to the globalPackageName if it cannot be found
*/
(
LOOKAHEAD ( ( Label() )* ( | ) ) ( Label() )* Block() ";"
|
LOOKAHEAD (4) ProgramUnit()
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTBlock Block() :
{/*@bgen(jjtree) Block */
ASTBlock jjtn000 = new ASTBlock(JJTBLOCK);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
}
{/*@bgen(jjtree) Block */
try {
/*@egen*/
// Included as part of statement()
[
[ DeclarativeSection() ]
]
(Statement())*
[ (ExceptionHandler())+]
[ ]/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/ // Optional END Identifier has to match the label
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTPackageSpecification PackageSpecification() :
{/*@bgen(jjtree) PackageSpecification */
ASTPackageSpecification jjtn000 = new ASTPackageSpecification(JJTPACKAGESPECIFICATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) PackageSpecification */
try {
/*@egen*/
(
[ [ KEYWORD("REPLACE")] [ | ] ]
simpleNode = ObjectNameDeclaration()
(
( ( | ))
| AccessibleByClause()
)*
(
(
WrappedObject()
)
|
(
( | )
[ DeclarativeSection() ]
[ID()] ";"
)
)
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTPackageBody PackageBody() :
{/*@bgen(jjtree) PackageBody */
ASTPackageBody jjtn000 = new ASTPackageBody(JJTPACKAGEBODY);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) PackageBody */
try {
/*@egen*/
(
[ [ KEYWORD("REPLACE")] [ | ] ]
( | ) simpleNode = ObjectNameDeclaration()
(
(
WrappedObject()
)
|
(
( | )
[ DeclarativeSection() ] //SRT 20110524 Allow PLDOc in Type Bodies
[ (Statement())* [ (ExceptionHandler())+] ] [ID()] ";"
)
)
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* https://docs.oracle.com/en/database/oracle/oracle-database/23/lnpls/block.html#GUID-9ACEB9ED-567E-4E1A-A16A-B8B35214FC9D__CJAIABJJ
*/
ASTDeclarativeUnit DeclarativeUnit() :
{/*@bgen(jjtree) DeclarativeUnit */
ASTDeclarativeUnit jjtn000 = new ASTDeclarativeUnit(JJTDECLARATIVEUNIT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) DeclarativeUnit */
try {
/*@egen*/
(
Pragma() |
LOOKAHEAD(2) ExceptionDeclaration() |
LOOKAHEAD((|) QualifiedID() ( | ) ) SubTypeDefinition() |
//SRT 20111117 - Special case of parameterless methods:choose method in preference to variable
LOOKAHEAD((|) QualifiedID() ) ProgramUnit() |
LOOKAHEAD(4) VariableOrConstantDeclaration() |
CursorSpecification() |
CollectionDeclaration() |
//ProgramUnit()|
//TypeMethod()|
MethodDeclaration() |
CompilationDeclarationFragment()
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* "Declare Section"
*
* https://docs.oracle.com/en/database/oracle/oracle-database/23/lnpls/block.html#GUID-9ACEB9ED-567E-4E1A-A16A-B8B35214FC9D__CJAIABJJ
*/
ASTDeclarativeSection DeclarativeSection() :
{/*@bgen(jjtree) DeclarativeSection */
ASTDeclarativeSection jjtn000 = new ASTDeclarativeSection(JJTDECLARATIVESECTION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) DeclarativeSection */
try {
/*@egen*/
DeclarativeUnit()
( LOOKAHEAD(3) DeclarativeUnit() )*/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTCompilationDeclarationFragment CompilationDeclarationFragment() :
{/*@bgen(jjtree) CompilationDeclarationFragment */
ASTCompilationDeclarationFragment jjtn000 = new ASTCompilationDeclarationFragment(JJTCOMPILATIONDECLARATIONFRAGMENT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
}
{/*@bgen(jjtree) CompilationDeclarationFragment */
try {
/*@egen*/
( //SRT 20110601
ConditionalOrExpression()
(DeclarativeUnit()
| Expression()
)*
(
ConditionalOrExpression()
(DeclarativeUnit()
| Expression()
)*
)*
(
(DeclarativeUnit()
| Expression()
)*
)*
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* 2006-05-22 - Matthias Hendler - Printing of custom tag "@deprecated" removed.
* Printing of any custom tag added. Now user can define his own
* custom tags which he can evaluate in the XSLT.
* This methode also documents global functions/procedures.
*/
ASTProgramUnit ProgramUnit() :
{/*@bgen(jjtree) ProgramUnit */
ASTProgramUnit jjtn000 = new ASTProgramUnit(JJTPROGRAMUNIT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
}
{/*@bgen(jjtree) ProgramUnit */
try {
/*@egen*/
(
[ [ KEYWORD("REPLACE")] [ | ] ]
MethodDeclarator()
(
WrappedObject()
|
/*
//SRT 20110516 Cope with AUTHID for schema level functions and procedures
(tokenIsAs= ( | ))?
*/
( ( ( | ) ) |
| AccessibleByClause()
| [ ParallelClause() ] [ ID() ["." ID()] ]
| [ ( ID() ["." ID()] )
| //20110531
(( | ) [ID()] "(" ID() ( "," ID() )* ")" )
] // drvparx.IndexMapDocuments
| [ "(" ID() ["." ID()] ( "," ID() ["." ID()])* ")" ]
) *
[ ID() ]
// body
[
( | )
//SRT ( | )
(
LOOKAHEAD(2)
CallSpecTail() //{ System.err.println("Found CallSpecTail") ; }
|
(
[ DeclarativeSection() ]
[Pragma()] // See PMD Bug #1527
(Statement())* [ (ExceptionHandler())+] [ID()]
)
)
]
";" //SRT 20110416 { System.err.println("Found terminating semi-colon") ; }
) //UnwrappedCode
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTObjectNameDeclaration ObjectNameDeclaration() :
{/*@bgen(jjtree) ObjectNameDeclaration */
ASTObjectNameDeclaration jjtn000 = new ASTObjectNameDeclaration(JJTOBJECTNAMEDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/PLSQLNode schemaName = null, objectName = null ; }
{/*@bgen(jjtree) ObjectNameDeclaration */
try {
/*@egen*/
[ LOOKAHEAD(2) schemaName = ID() "." ] objectName = ID()
{ jjtn000.setImage( (null == schemaName) ? objectName.getImage() : (schemaName.getImage() + "." + objectName.getImage() ) ) ; }/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/*
* See https://docs.oracle.com/en/database/oracle/oracle-database/18/lnpls/formal-parameter-declaration.html#GUID-5BA8E033-96B9-439A-A4FC-4844FEC14AD8
*/
ASTFormalParameter FormalParameter() :
{/*@bgen(jjtree) FormalParameter */
ASTFormalParameter jjtn000 = new ASTFormalParameter(JJTFORMALPARAMETER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) FormalParameter */
try {
/*@egen*/
(
simpleNode = ID()
[ {jjtn000.setIn(true); } ]
[ {jjtn000.setOut(true); } ]
[ {jjtn000.setNoCopy(true); } ]
("..." | Datatype())
( (":" "="|<_DEFAULT>) Expression() )?
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTMethodDeclaration MethodDeclaration() :
{/*@bgen(jjtree) MethodDeclaration */
ASTMethodDeclaration jjtn000 = new ASTMethodDeclaration(JJTMETHODDECLARATION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/}
{/*@bgen(jjtree) MethodDeclaration */
try {
/*@egen*/
(
ProgramUnit()
|
TypeMethod()
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTMethodDeclarator MethodDeclarator() :
{/*@bgen(jjtree) MethodDeclarator */
ASTMethodDeclarator jjtn000 = new ASTMethodDeclarator(JJTMETHODDECLARATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) MethodDeclarator */
try {
/*@egen*/
(
simpleNode = ObjectNameDeclaration()
(
[ FormalParameters() ]
{
net.sourceforge.pmd.lang.ast.impl.javacc.JavaccToken nextToken;
nextToken = getToken(1); //ReadAhead
if (!nextToken.getImage().equalsIgnoreCase("WRAPPED")
&&
!nextToken.getImage().equalsIgnoreCase("RETURN")
)
{
throw new net.sourceforge.pmd.lang.ast.ParseException("FUNCTION must RETURN a value or must be WRAPPED : found \""
+ nextToken.getImage()
+ "\""
).withLocation(nextToken);
}
}
// There is no RETURN for a WRAPPED object
[ Datatype() [ LOOKAHEAD({isKeyword("SQL_MACRO")}) SqlMacroClause() ] ]
)
|
simpleNode = ObjectNameDeclaration()
(
[ FormalParameters() ]
)
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTFormalParameters FormalParameters() :
{/*@bgen(jjtree) FormalParameters */
ASTFormalParameters jjtn000 = new ASTFormalParameters(JJTFORMALPARAMETERS);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
StringBuilder sb = new StringBuilder();
}
{/*@bgen(jjtree) FormalParameters */
try {
/*@egen*/
(
"(" {sb.append("(");}
[ simpleNode = FormalParameter() { sb.append(simpleNode.getImage());}
( "," simpleNode = FormalParameter() { sb.append(","+simpleNode.getImage());} )*
]
")"{sb.append(")");}
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(sb.toString()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTVariableOrConstantDeclarator VariableOrConstantDeclarator() :
{/*@bgen(jjtree) VariableOrConstantDeclarator */
ASTVariableOrConstantDeclarator jjtn000 = new ASTVariableOrConstantDeclarator(JJTVARIABLEORCONSTANTDECLARATOR);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
StringBuilder sb = new StringBuilder();
}
{/*@bgen(jjtree) VariableOrConstantDeclarator */
try {
/*@egen*/
(
simpleNode = VariableOrConstantDeclaratorId() { sb.append(simpleNode.getImage());}
[LOOKAHEAD(2) {sb.append(" " + token.getImage());} ] simpleNode = Datatype() { sb.append(" " + simpleNode.getImage());}
[[ {sb.append(" " + token.getImage());} ] {sb.append(" " + token.getImage());} ]
[ ( ":" "=" {sb.append(" :=");}| <_DEFAULT> {sb.append(" " + token.getImage());})
simpleNode = VariableOrConstantInitializer() { sb.append(" " + simpleNode.getImage());}
]
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(sb.toString()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTVariableOrConstantDeclaratorId VariableOrConstantDeclaratorId() :
{/*@bgen(jjtree) VariableOrConstantDeclaratorId */
ASTVariableOrConstantDeclaratorId jjtn000 = new ASTVariableOrConstantDeclaratorId(JJTVARIABLEORCONSTANTDECLARATORID);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) VariableOrConstantDeclaratorId */
try {
/*@egen*/
simpleNode = ID()/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTVariableOrConstantInitializer VariableOrConstantInitializer() :
{/*@bgen(jjtree) VariableOrConstantInitializer */
ASTVariableOrConstantInitializer jjtn000 = new ASTVariableOrConstantInitializer(JJTVARIABLEORCONSTANTINITIALIZER);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
}
{/*@bgen(jjtree) VariableOrConstantInitializer */
try {
/*@egen*/
simpleNode = Expression()/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(simpleNode.getImage()) ; return jjtn000 ; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTDatatype Datatype() :
{/*@bgen(jjtree) Datatype */
ASTDatatype jjtn000 = new ASTDatatype(JJTDATATYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null ;
StringBuilder sb = new StringBuilder();
}
{/*@bgen(jjtree) Datatype */
try {
/*@egen*/
(
// this should be first
simpleNode = CompilationDataType() {sb.append(simpleNode.getImage());} |
LOOKAHEAD(2) simpleNode = ScalarDataTypeName() {sb.append(simpleNode.getImage());}
|
(
( [LOOKAHEAD(2) "REF" {sb.append(token.getImage());} ] simpleNode = QualifiedName() {sb.append(simpleNode.getImage());}
//Bug 35352414 - datatype may include dblink
["@" simpleNode = QualifiedName() {sb.append("@"+simpleNode.getImage());} ]
["%" (|){sb.append("%"+token.getImage());} ]
)
)
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{ jjtn000.setImage(sb.toString()) ; return jjtn000; }/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
ASTCompilationDataType CompilationDataType() :
{/*@bgen(jjtree) CompilationDataType */
ASTCompilationDataType jjtn000 = new ASTCompilationDataType(JJTCOMPILATIONDATATYPE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/
PLSQLNode simpleNode = null;
StringBuilder sb = new StringBuilder() ;
}
{/*@bgen(jjtree) CompilationDataType */
try {
/*@egen*/
(
{sb.append(" "); sb.append(token.getImage()) ; }
simpleNode= ConditionalOrExpression() {sb.append(" "); sb.append(simpleNode.getImage()); }
{sb.append(" "); sb.append(token.getImage()); }
simpleNode = Datatype() {sb.append(" "); sb.append(simpleNode.getImage()); }
(
{sb.append(" "); sb.append(token.getImage()); }
simpleNode = ConditionalOrExpression() {sb.append(" "); sb.append(simpleNode.getImage()); }
{sb.append(" "); sb.append(token.getImage()); }
simpleNode = Datatype() {sb.append(" "); sb.append(simpleNode.getImage()); }
)*
(
{sb.append(" "); sb.append(token.getImage()); }
simpleNode = Datatype() {sb.append(" "); sb.append(simpleNode.getImage()); }
)*
{sb.append(" "); sb.append(token.getImage()); }
)/*@bgen(jjtree)*/
{
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
}
/*@egen*/
{
jjtn000.setImage(sb.toString()) ; return jjtn000;
}/*@bgen(jjtree)*/
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
throw (RuntimeException)jjte000;
}
if (jjte000 instanceof net.sourceforge.pmd.lang.ast.ParseException) {
throw (net.sourceforge.pmd.lang.ast.ParseException)jjte000;
}
throw (Error)jjte000;
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
/*@egen*/
}
/**
* https://docs.oracle.com/en/database/oracle/oracle-database/23/lnpls/CREATE-TYPE-statement.html#GUID-389D603D-FBD0-452A-8414-240BBBC57034__OBJECT_BASE_TYPE_DEF-DE2DD0FF
*/
ASTCollectionTypeName CollectionTypeName() :
{/*@bgen(jjtree) CollectionTypeName */
ASTCollectionTypeName jjtn000 = new ASTCollectionTypeName(JJTCOLLECTIONTYPENAME);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
/*@egen*/ PLSQLNode size=null, precision=null;
StringBuilder sb = new StringBuilder();
}
{/*@bgen(jjtree) CollectionTypeName */
try {
/*@egen*/
(
// Collection types