1.

The above grammar and the semantic rules are fed to a yacc tool (which is an LALR (1) parser generator) for parsing and evaluating arithmetic expressions. Which one of the following is true about the action of yacc for the given grammar?

A. It detects recursion and eliminates recursion
B. It detects reduce-reduce conflict and resolves
C. It detects shift-reduce conflict and resolves the conflict in favour of a shift over a reduce action
D. It detects shift reduce conflict, and resolves the conflict in favour of a reduce over a shift action
Answer» D. It detects shift reduce conflict, and resolves the conflict in favour of a reduce over a shift action


Discussion

No Comment Found

Related MCQs