-
I've been dwelling through each statement rules in the grammar, when I run into the SET statement's, I saw this lvalueVariable rule which is basically used in case |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes, for the input
As with many grammars, sometimes the grammar will accept something that should be illegal. This is because there needs to be a semantic analyzer. It says so in the grammar for grammars-v4/sql/mysql/Oracle/MySQLParser.g4 Line 3211 in 63d037b One could add type-checking to the grammar through the actions and semantic predicates, but generally, the practice is to place that in a phase after parsing. |
Beta Was this translation helpful? Give feedback.
I suggest raising an Issue in the mysql-shell-plugins repo. The grammar here is scraped and refactored to target agnostic format from https://github.com/mysql/mysql-shell-plugins/tree/8928ada7d9e37a4075291880738983752b315fee/gui/frontend/src/parsing/mysql.