Skip to content

Commit 40fb930

Browse files
author
Martin Hansson
committed
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 50502af commit 40fb930

File tree

5 files changed

+1850
-1767
lines changed

5 files changed

+1850
-1767
lines changed

0 commit comments

Comments
 (0)