Closed mcpiroman closed 2 years ago
Thanks, @mcpiroman.
I reclassified the list of keywords using the v$reserved_words
from 21c and the keywords you mentioned will be accepted as valid identifiers.
Thanks!
So actually, I took the list of keywords that were marked as reserved and intersected them with v$reserved_words that are RESERVED = 'N', which theoretically gives the list of keywords that should be undeclared as reserved. However, as I tested, only some of them (i.e. COMPLETE , PCTUSED, INCREMENT, TABLESPACE, SOME, INITRANS) can be used to name a procedure - although v$reserved_words shows no distinction between them and the others.
So I suggest that, unless investigated, using v$reserved_words alone may not be fully correct. Prominently, it reports many keywords like IF or DECLARE as completely not reserved, while you can't use them as identifiers (unless I miss something).
It is marked as reserved in
PlSqlKeyword.kt
but, at least on 19c, it is not:Therefore parser throws at this valid code:
Edit: I have found this is also the case for these keywords: PCTUSED, INCREMENT, TABLESPACE, SOME, INITRANS