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

Greatly improve grammar for CREATE/ALTER #805

Merged
merged 6 commits into from
Aug 16, 2024
Merged

Greatly improve grammar for CREATE/ALTER #805

merged 6 commits into from
Aug 16, 2024

Conversation

jimidle
Copy link
Contributor

@jimidle jimidle commented Aug 15, 2024

Here, we greatly improve the grammar constructs for create and alter and additionally, make parsing of id . id orthogonal instead of having 17 rules to parse the same construct.

We also remove the mountain of superfluous labels given to many tokens and rules, which just add bloat to the generated code.

As a result, the error recovery mechanism is more accurate in identifying the source of syntax errors as there is much less ambiguity. The size of the generated parser file is also 'smaller' at 99387 lines vs 107354 - we intend to continue reducing this.

@jimidle jimidle added internal technical pr's not end user facing sql/tsql antlr Changes to any of the ANTLR g4 grammar files. labels Aug 15, 2024
Copy link

github-actions bot commented Aug 15, 2024

Coverage tests results

401 tests  ±0   200 ✅ ±0   4s ⏱️ ±0s
  2 suites ±0     0 💤 ±0 
  2 files   ±0   201 ❌ ±0 

For more details on these failures, see this check.

Results for commit 76e613d. ± Comparison against base commit e0cd57e.

♻️ This comment has been updated with latest results.

@jimidle jimidle self-assigned this Aug 15, 2024
@jimidle jimidle requested a review from nfx August 15, 2024 22:06
@jimidle jimidle marked this pull request as ready for review August 15, 2024 22:12
@jimidle jimidle requested a review from a team as a code owner August 15, 2024 22:12
@jimidle jimidle requested a review from ravit-db August 15, 2024 22:12
@nfx nfx added the pr/rebase label Aug 16, 2024
@jimidle jimidle removed the pr/rebase label Aug 16, 2024
@jimidle jimidle removed the request for review from ravit-db August 16, 2024 13:49
@nfx nfx merged commit 538b412 into main Aug 16, 2024
9 checks passed
@nfx nfx deleted the feature/carevamp branch August 16, 2024 13:53
sundarshankar89 pushed a commit to sundarshankar89/remorph that referenced this pull request Jan 2, 2025
Here, we greatly improve the grammar constructs for create and alter and
additionally, make parsing of `id . id` orthogonal instead of having 17
rules to parse the same construct.

We also remove the mountain of superfluous labels given to many tokens
and rules, which just add bloat to the generated code.

As a result, the error recovery mechanism is more accurate in
identifying the source of syntax errors as there is much less ambiguity.
The size of the generated parser file is also 'smaller' at 99387 lines
vs 107354 - we intend to continue reducing this.
sundarshankar89 pushed a commit to sundarshankar89/remorph that referenced this pull request Jan 3, 2025
Here, we greatly improve the grammar constructs for create and alter and
additionally, make parsing of `id . id` orthogonal instead of having 17
rules to parse the same construct.

We also remove the mountain of superfluous labels given to many tokens
and rules, which just add bloat to the generated code.

As a result, the error recovery mechanism is more accurate in
identifying the source of syntax errors as there is much less ambiguity.
The size of the generated parser file is also 'smaller' at 99387 lines
vs 107354 - we intend to continue reducing this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
antlr Changes to any of the ANTLR g4 grammar files. internal technical pr's not end user facing sql/tsql
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants