Computer Science EngineeringHardISRO SC

A shift/reduce conflict in a Yacc-style generator that is not resolved by precedence declarations is, by default, resolved by

  1. A. reducing
  2. B. reporting an error and stopping
  3. C. shifting
  4. D. choosing randomly

Correct answer: C. shifting

Yacc and Bison resolve shift/reduce conflicts in favour of shifting, and reduce/reduce conflicts in favour of the earlier rule.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic