Am 10.04.2018 um 10:58 schrieb Alexander Barkov:
I reviewed your recent changes in "10.3-MDEV-11953"
(and the attached additional patch for sql_yacc_ora.yy)
I have some proposals:
1. Can you please move huge pieces of the code from sql_yacc.yy to LEX
or other relevant classes?
It makes the grammar much more readable (patches are aslo much more
I'd move the relevant pieces of the code to LEX as a separate patch,
even before fixing the grammar.
2. You're adding too many main_select_push() and pop_select().
Please move them to upper level rules (it should be possible in many cases).
Add new helper rules when needed.
For example, this piece of code repeats many times:
+ if (Lex->main_select_push())
+ Lex->pop_select(); //main select
+ $$= $3;
It deserved a rule, say, expr_with_select_push_pop.
You can find a better name :)
The task did not made parser recognizing brackets, and I have no ideas
how to return parser errors when all SELECT parsed in the same way in
difference from the previous parser which could recognize only one level
- Serg and I spent a lot of time working on this task:
MDEV-8909 union parser cleanup
(and its 13 dependency tasks, and 3 related tasks,
see the "Issue links" section in MDEV).
We think that it should be the parser who disallows bad grammar, instead
of post-analysis with raising errors like
Please keep using the same approach.
Mailing list: https://launchpad.net/~maria-developers
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~maria-developers
More help : https://help.launchpad.net/ListHelp