v0.5.0
Non-Breaking
-
memoize reusable list productions, fixing a bug where repeating a list would cause a reduce-reduce conflict.
Alpha ::= Beta+ Gamma; Delta ::= Beta+ Epsilon;previously expanded to
Alpha__0__List ::= Alpha__0__List? Beta; Alpha ::= Alpha__0__List Gamma; Delta__0__List ::= Delta__0__List? Beta; Delta ::= Delta__0__List Epsilon;Then the instance
Beta Beta Betawould cause a reduce-reduce conflict: “should the parser reduce toAlpha__0__ListorDelta__0__List?”Now, the EBNF builder is smart enough to reuse the item
Beta+, and produce the following expansion:Alpha__0__List ::= Alpha__0__List? Beta; Alpha ::= Alpha__0__List Gamma; Delta ::= Alpha__0__List Epsilon;Now
Beta Beta Betaunambiguously reduces toAlpha__0__List.