simplified lookahead for blocks and proc/func

This commit is contained in:
Piotr Szymanski
2019-08-20 21:22:42 +02:00
parent fac5604d63
commit 5a444276f8
4 changed files with 70 additions and 7 deletions

View File

@@ -251,7 +251,7 @@ ASTInput Input(String sourcecode) : {}
| LOOKAHEAD(6) Directory()
| LOOKAHEAD(6) DatabaseLink()
| LOOKAHEAD(6) Global()
| LOOKAHEAD(6) DDLCommand() //Ignore any other DDL Event
| LOOKAHEAD(6) DDLCommand() //Ignore any other DDL Event
| LOOKAHEAD(2) SqlPlusCommand()
| UpdateStatement()
| DeleteStatement()
@@ -351,21 +351,19 @@ ASTGlobal Global() :
{
}
{
/*
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() )* [<DECLARE> DeclarativeSection()] <BEGIN>) ( Label() )* Block() ";" | LOOKAHEAD (4) ProgramUnit()
(
LOOKAHEAD ( ( Label() )* ( <DECLARE> | <BEGIN> ) ) ( Label() )* Block() ";"
|
LOOKAHEAD (4) ProgramUnit()
)
{ return jjtThis ; }
}
ASTBlock Block() :
{
}