Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Parser fails on package initialization block #8

Open
ChristopheDeClercq opened this issue Nov 6, 2011 · 1 comment
Open

Parser fails on package initialization block #8

ChristopheDeClercq opened this issue Nov 6, 2011 · 1 comment

Comments

@ChristopheDeClercq
Copy link

When I test the parser with following code block it fails to recognize "initialization part" of the package (the last begin null;).

create or replace package body abc
is
a number;

procedure x
is
y number;
begin
a := y;
end;

begin
null;
end;
/

@z0rg
Copy link

z0rg commented Jun 9, 2012

It seems the problem is in PLSQLParser.g
package_body
: body_key package_name (is_key | as_key)
package_obj_body*
(begin_key seq_of_statements|end_key package_name?)
-> package_name+ package_obj_body* seq_of_statements?
;
Line
(begin_key seq_of_statements|end_key package_name?)
should look like this:
(begin_key seq_of_statements)? end_key package_name?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants