Skip to content

Bugfix Earley: handle ambiguity from ignored tokens#1577

Merged
erezsh merged 2 commits intolark-parser:masterfrom
chanicpanic:issue1576
Mar 26, 2026
Merged

Bugfix Earley: handle ambiguity from ignored tokens#1577
erezsh merged 2 commits intolark-parser:masterfrom
chanicpanic:issue1576

Conversation

@chanicpanic
Copy link
Copy Markdown
Contributor

Fixes #1576: an edge case in which start symbol nodes were not shared between start symbol items that completed at different parts of the string due to ignores.

Thanks @kwilinsi for the great MCVE!

@chanicpanic chanicpanic changed the title Bugfix Earley: handle ambiguity from strings ending in ignored tokens Bugfix Earley: handle ambiguity from ignored tokens Mar 7, 2026
@chanicpanic
Copy link
Copy Markdown
Contributor Author

I realized that the issue also applies to ambiguity involving ignores anywhere in the string. The parser now produces previously unsurfaced derivations.

@erezsh erezsh merged commit ae22d4f into lark-parser:master Mar 26, 2026
9 checks passed
@erezsh
Copy link
Copy Markdown
Member

erezsh commented Mar 26, 2026

Nice, thank you!

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.

Ambiguity from trailing whitespace causes a RuntimeError in Earley

2 participants