Commit 8fb8496
Martin Hansson
Initial refactoring.
- Renamed most rules starting with select_ to the names used in the SQL
standard, <query expression>, <query expression body>, <query term>, <query
primary> and <subquery>, respectively.
- Added %expect 0
- The previous rule for UNION/INTERSECT syntax was right-recursive, and so the
parse tree is right-deep. This patch only changes the rule, you don't want
right-recursion in an LALR parser, and moreover it's not standard. It doesn't
change the parse tree structure, so we need an extra wrinkle to build the
parse tree top-down.
- Indentation follows the most common standard, found in MySQL and Postgres.
Future work: INTERSECT has higher priority than UNION in the standard, but these
rules give them the same priority.1 parent 27d77a7 commit 8fb8496
File tree
6 files changed
+5331
-6358
lines changed- src/parser
- test/thirdparty/microtest
6 files changed
+5331
-6358
lines changedLarge diffs are not rendered by default.
0 commit comments