From 6e4fbfdba72479c8f52c32b87d8c3dc176b4a502 Mon Sep 17 00:00:00 2001 From: asfernandes Date: Mon, 13 May 2013 01:49:34 +0000 Subject: [PATCH] Changed package routines syntax to not need (nor accept) a semi-colon after "END". --- examples/package/fbout-body.sql | 10 +++++----- src/dsql/parse.y | 7 +++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/package/fbout-body.sql b/examples/package/fbout-body.sql index abb29f104d..62e5ecf145 100644 --- a/examples/package/fbout-body.sql +++ b/examples/package/fbout-body.sql @@ -30,13 +30,13 @@ begin as begin rdb$set_context('USER_SESSION', 'fb$out.enabled', '1'); - end; + end procedure disable as begin rdb$set_context('USER_SESSION', 'fb$out.enabled', null); - end; + end procedure put_line (line fb$out_type) as @@ -49,14 +49,14 @@ begin values (next value for fb$out_seq, :line); end end - end; + end procedure clear as begin in autonomous transaction do delete from fb$out_table; - end; + end procedure get_lines returns (lines fb$out_type) as @@ -77,7 +77,7 @@ begin end execute procedure clear; - end; + end end! diff --git a/src/dsql/parse.y b/src/dsql/parse.y index 1995126445..ed9f5ffb27 100644 --- a/src/dsql/parse.y +++ b/src/dsql/parse.y @@ -2403,8 +2403,7 @@ package_body_clause %type package_body_items_opt package_body_items_opt - : - { $$ = newNode >(); } + : /* nothing */ { $$ = newNode >(); } | package_body_items ; @@ -2424,9 +2423,9 @@ package_body_items %type package_body_item package_body_item - : FUNCTION function_clause ';' + : FUNCTION function_clause { $$ = CreateAlterPackageNode::Item::create($2); } - | PROCEDURE procedure_clause ';' + | PROCEDURE procedure_clause { $$ = CreateAlterPackageNode::Item::create($2); } ;