The lark grammar start.1: "a" | start start*
causes lark's LALR back-end (and CYK) to enter an infinite
loop when parser='lalr' is requested. Earley
terminates normally. Without the .1 priority
on start, lark raises GrammarError
instead — only the priority-plus-recursive-alt combination
triggers the hang.
Because the bug is a hang rather than a wrong result,
this page runs Pyodide + lark inside a Web Worker and the
main thread imposes a wall-clock budget. If the worker
does not return a result in time, the verdict is
reproduced and the worker is terminated; if
the parse returns or raises before the budget elapses,
the verdict is unreproduced.
The full discussion lives in the GitHub issue thread
linked below.
A fix-candidate branch
(JamBalaya56562/lark@claude/fix-lark-1585-QLVa7)
is built into a pure-Python wheel under ./wheels/
and installed into a second Pyodide worker after the baseline
run completes, so visitors can compare the before/after
verdict in one page load.