Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate SQLite Grammar to maintained version #1397

Merged
merged 8 commits into from Jan 27, 2022

Conversation

PadraigK
Copy link
Contributor

@PadraigK PadraigK commented Jan 26, 2022

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.

New grammar has some slightly different names, no logic changes here
Drops are no longer distinguished between index, trigger, table at the callback level, instead the type is included as the object on the Drop_stmtContext
@PadraigK PadraigK marked this pull request as ready for review January 26, 2022 20:03
@kyleconroy kyleconroy merged commit dcb19a1 into sqlc-dev:main Jan 27, 2022
@StevenACoffman StevenACoffman mentioned this pull request Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants