2 votes 2 votes In the above grammar, 1. how to determine the precedence of the operator? 2. If there is shift and reduce conflict, in who's favor to resolve? 3. Why are we not reducing E-->E+E, instead we are shifting. But incase of E-->id, we are reducing. Compiler Design compiler-design parsing grammar test-series + – Purple asked Jan 27, 2016 retagged Jul 16, 2022 by Anjana5051 Purple 635 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes when you can not derive any precedence out of the gramaar rules, use the general precedence of operators. which is id > * > + > $ now if you know how the above algorithm works you will certainly know why i) has not been reduced and ii) also not reduced confused_luck answered Feb 2, 2016 confused_luck comment Share Follow See all 0 reply Please log in or register to add a comment.