Commit a5a616f
authored
Adds support for string literals and identifiers in
Refactors the PEG to make each keyword and explicit rule that has the
form `KeywordName_`. This allows us to easily refer to them in rules
without having to have magic strings. The rationale for the `_` suffix
is to make sure it doesn't collide with the other grammar rules and not
have a wordy suffix like `Keyword` on every rule.
Also:
* Adds case folding to keywords.
* Makes error cases in the scanner tests less brittle.
* Adds `Token` to the `Query` rule and updates tests for
`recognize_partiql`.Scanner. (#15)1 parent 2777229 commit a5a616f
4 files changed
+773
-285
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
0 commit comments