Reforming the grammar to remove shift reduce conflict in if-then-else
There is a much simpler solution. If you know how LR parsers work, then you know that the conflict happens here: if ( expression ) statement * else statement where the star marks the current position of the cursor. The question the parser must answer is “should I shift, or should I reduce”. Usually, you … Read more