procedure_call -> DECLARE BEGIN function_ref_list END : {'declare begin procedure', '$3'}.
procedure_call -> DECLARE BEGIN sql_list END : {'declare begin procedure', '$3'}.
procedure_call -> BEGIN function_ref_list END : {'begin procedure', '$2'}.
procedure_call -> BEGIN sql_list END : {'begin procedure', '$2'}.
procedure_call -> CALL function_ref : {'call procedure', '$2'}.
New sqlparse grammar:
procedure_call -> BEGIN function_ref_list END : {'begin procedure', '$2'}.
procedure_call -> BEGIN sql_list END : {'begin procedure', '$2'}.
procedure_call -> CALL function_ref : {'call procedure', '$2'}.
This solves the issues #34. The new grammar definition is parse tree compatible with the existing grammar.
Oracle 12c grammar (simplified):
Oracle Database PL/SQL Language Reference
plsql_block ::=
declare_section ::=
body ::=
Current sqlparse grammar:
New sqlparse grammar: