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

[bison] Fix for #4312 -- replace recursion with kleene *-operators, and add TypeScript and Antlr4ng ports #4313

Merged
merged 1 commit into from
Nov 9, 2024

Conversation

kaby76
Copy link
Contributor

@kaby76 kaby76 commented Nov 7, 2024

The PR fixes #4312, where some rules were written with (left) recursion. While Antlr certainly can handle recursion, the main issue is performance. With recursion, I get stack overflows with the CSharp target in Release mode. I don't know why but Debug mode .NET builds are just fine.

The change refactors four rules with kleene *-operators. In addition, the TypeScript port, which did work, then stopped working, started to work again! I think this is due to numerous changes in the TypeScript runtime now in 4.13.2. With a TypeScript port, Antlr4ng wasn't far of a reach so I added that. The desc.xml is changed to reflect this.

@teverett
Copy link
Member

teverett commented Nov 9, 2024

@kaby76 thanks!

@teverett teverett merged commit 00ad7b0 into antlr:master Nov 9, 2024
31 checks passed
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.

[bison] Bison grammar contains several Bison-idiomatic rules.
2 participants