Migrate SQLite Grammar to maintained version #1397
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The grammar located in antlr/grammars-v4 is more up-to-date and maintained than the one used in sqlc currently. This PR switches the grammar file to use the maintained one, and then fixes the fallout from that change (minor renaming and reorganizing).
I am not sure if SQLite support in sqlc will ultimately build off the antlr approach, or one of the other approaches being discussed in #161 but this PR gets the pieces in place to let me and others continue down the antlr path that the codebase is currently on.
Most of the line changes are the generated parser. Actual code changes are fairly minor, and arose from migrating to the slightly different grammar which required some minor tweaks in order to build and keep existing tests working.