Skip to content

Commit b6fa75b

Browse files
authored
Fills in the start of a real PartiQL grammar. (#33)
The grammar breaks out `SelectExpression` from `ValueExpression` but unifies them with grouping. This is actually not supported in the Kotlin parser, but is actually the correct form in my opinion. Also cleans up atomicity/silencing in the dependent terminal rules and while doing this, the spacing was adjusted to make this easier to read. More specifically, all punctuation is basically silent because grammar rules don't want them to be in the parse, and keywords are also silent because the grammar enforces the structure. Operators on the other hand are atomic and visible because they are used in the parse tree to drive precedence climbing/Pratt processing and are thus required to be visible. This is clearly not a complete grammar, nor are the tests sufficient, but this is a good starting place to build in that structure. Some explicit TODOs here: * The special operators/binary/unary operators. * The various `SELECT` projection forms: - `SELECT *`/`SELECT` list * Joins in the `FROM` clause * Various other clauses `GROUP BY`/`HAVING`/`ORDER BY` (set expressions).
1 parent e08a7cf commit b6fa75b

File tree

2 files changed

+438
-283
lines changed

2 files changed

+438
-283
lines changed

0 commit comments

Comments
 (0)