Skip to content

Conversation

@csm101
Copy link
Contributor

@csm101 csm101 commented Nov 23, 2025

Oracle accepts an optional (and useless...) keyword "FIELDS" in insert statements, like in this example

INSERT INTO mytable FIELDS (myfield) VALUES ('myvalue');

the grammar did not accept this FIELDS keyword.

Moreover: it is actually possible do declare a plsql variable named "AUDIT" even if AUDIT is a keyword: this compiles just fine for oracle:
declare
audit CLOB;
begin
....
end;

but this wasn't accepted by the grammar. I fixed it too

…less, but supported by oracle) keyword "FIELDS" (e.g.: INSERT INTO tabname FIELDS (....) VALUES(...) )

added "AUDIT" as valid  identifier name (for example in plsql variable declarations)
… be used also as variable names in variable declarations
…) procedures also in the create package spec command: the grammar did allow them only in the package body

(I am referring to declarations like "procedure MyJavaProc as JAVA 'javaclass.staticmethodname'; "
…ameter. clearly this is an error: it is perfectly fine to have parameterless member procedures
…y "IN" was not allowed, moreover, some complex expression types (like myarray(5).myvalue) were not allowed
…unctions was missing support for IN/OUT/NOCOPY specifiers and for default values
…pl/sql bock. the grammar was expecting at least one declaration
@teverett
Copy link
Member

teverett commented Dec 8, 2025

@csm101 thanks

@teverett teverett merged commit 0f2069e into antlr:master Dec 8, 2025
32 checks passed
@KvanTTT KvanTTT added the plsql label Dec 8, 2025
@KvanTTT
Copy link
Member

KvanTTT commented Dec 8, 2025

@csm101 could you please add some test data that cover the changes in grammar?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants