Repository navigation
Allow specific keywords to be parsed as identifiers (fix issue with RENAME COLUMN) - #2203
Merged
Merged
Conversation
Contributor
|
We need to rework the whole keyword management eventually. But in the meantime this can be a remedy. |
Contributor
Author
|
Hi, @manticore-projects |
Summary
This PR introduces a new parser rule
KeywordOrIdentifier()to handle cases where certain keywords are used as identifiers. This addresses issues that arose after specific tokens likeNAMEwere introduced as keywords.Problem
While parsing a statement like:
the parser failed because
namewas recognized strictly as a<K_NAME>keyword after this commit, instead of being allowed as an identifier.Solution
KeywordOrIdentifier()rule that accepts:<S_IDENTIFIER><S_QUOTED_IDENTIFIER><K_NAME>,<K_NEXT>,<K_VALUE>,<K_PUBLIC>,<K_STRING>KeywordOrIdentifier().I’m open to any feedback or suggestions on this approach!