This is the shortest I managed to get the grammar. No idea what's causing the infinite loop, but notably it only happens when I set the priority start.1. Without that it throws a GrammarError.
Lark(
'start.1: "a" | start start*',
parser='lalr'
).parse('aa')
I get the same issue in cyk but not earley.
This is the shortest I managed to get the grammar. No idea what's causing the infinite loop, but notably it only happens when I set the priority
start.1. Without that it throws aGrammarError.I get the same issue in
cykbut notearley.