mdaines / grammophone

A tool for analyzing and transforming context-free grammars.
https://mdaines.github.io/grammophone
MIT License
205 stars 23 forks source link

Strange reduction claim #11

Closed ghost closed 3 years ago

ghost commented 3 years ago

I have input the following grammar:

S -> a A .
A -> A a .
A -> b .

Grammophone tells me:

LR(0) Not LR(0) — it contains a shift-reduce conflict.

Adding E -> S eof . doesn't help either. Bug or feature?

ghost commented 3 years ago

Ok I see, to make use of eof we would need LR(1).