Hi,

I came across https://lezer.codemirror.net last week and I think they have a 
really good way of dealing with conflicts:
In Lezer’s grammars, all conflicts must be marked with “ambiguity markers”. The 
concept is described on https://lezer.codemirror.net/docs/guide/, subsection 
“Allowing ambiguity”.

I think this approach is superior to bison’s “%expect and %expect-rr modifiers 
on individual rules” because:
* the ambiguity markers specify at what exact position inside the rule the 
conflict occurs
* using the ambiguity markers, it is exactly documented which positions 
conflict with which other rules, instead of only the number of conflicts

What do you think about this feature? Would something like this also be 
valuable for bison?
How hard would it be to implement similar functionality in bison? (I have no 
clue about bison’s C-parts, yet…)

Cheers,
Adrian

Reply via email to