8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 16:03:03 +01:00

Add ALTER PACKAGE BODY and CRETE OR ALTER PACKAGE BODY parse rules (#8309)

This commit is contained in:
Artyom Abakumov 2024-11-08 14:18:11 +03:00 committed by GitHub
parent 5b815785a7
commit 52657ab691
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 2 deletions

View File

@ -28,7 +28,7 @@ Syntax:
PROCEDURE <name> [( <parameters> ) [RETURNS ( <parameters> )]] PROCEDURE <name> [( <parameters> ) [RETURNS ( <parameters> )]]
<package_body> ::= <package_body> ::=
{ CREATE | RECREATE } PACKAGE BODY <name> { CREATE [OR ALTER] | ALTER | RECREATE } PACKAGE BODY <name>
AS AS
BEGIN BEGIN
[ <package_item> ... ] [ <package_item> ... ]

View File

@ -1 +1 @@
115 shift/reduce conflicts, 22 reduce/reduce conflicts. 117 shift/reduce conflicts, 22 reduce/reduce conflicts.

View File

@ -1711,6 +1711,7 @@ replace_clause
| FUNCTION replace_function_clause { $$ = $2; } | FUNCTION replace_function_clause { $$ = $2; }
| TRIGGER replace_trigger_clause { $$ = $2; } | TRIGGER replace_trigger_clause { $$ = $2; }
| PACKAGE replace_package_clause { $$ = $2; } | PACKAGE replace_package_clause { $$ = $2; }
| PACKAGE BODY replace_package_body_clause { $$ = $3; }
| VIEW replace_view_clause { $$ = $2; } | VIEW replace_view_clause { $$ = $2; }
| EXCEPTION replace_exception_clause { $$ = $2; } | EXCEPTION replace_exception_clause { $$ = $2; }
| GENERATOR replace_sequence_clause { $$ = $2; } | GENERATOR replace_sequence_clause { $$ = $2; }
@ -3228,6 +3229,12 @@ package_body_item
; ;
%type <ddlNode> replace_package_body_clause
replace_package_body_clause
: package_body_clause
{ $$ = newNode<RecreatePackageBodyNode>($1); }
;
%type <localDeclarationsNode> local_declarations_opt %type <localDeclarationsNode> local_declarations_opt
local_declarations_opt local_declarations_opt
: local_forward_declarations_opt local_nonforward_declarations_opt : local_forward_declarations_opt local_nonforward_declarations_opt
@ -4294,6 +4301,7 @@ alter_clause
| TRIGGER alter_trigger_clause { $$ = $2; } | TRIGGER alter_trigger_clause { $$ = $2; }
| PROCEDURE alter_procedure_clause { $$ = $2; } | PROCEDURE alter_procedure_clause { $$ = $2; }
| PACKAGE alter_package_clause { $$ = $2; } | PACKAGE alter_package_clause { $$ = $2; }
| PACKAGE BODY replace_package_body_clause { $$ = $3; }
| DATABASE | DATABASE
{ $<alterDatabaseNode>$ = newNode<AlterDatabaseNode>(); } { $<alterDatabaseNode>$ = newNode<AlterDatabaseNode>(); }
alter_db($<alterDatabaseNode>2) alter_db($<alterDatabaseNode>2)