I have constructed an SLR(1) parsing table with the following rules.S -> S + S + S (rule 1)S -> S + S (rule 2)S -> yIs reducing rule 2, then shifting + and y, then again rule 2, equivalent to reducing rule 1? Can I claim to have reduced by rule 1, even though I did so indirectly?
Can we say we reduced a rule if we reduced an equivalent set of smaller rules?
context free;formal grammars;parsers;ambiguity