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
- A. reducing
- B. reporting an error and stopping
- C. shifting
- 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.
Practise more Theory of Computation, Compilers & Digital Logic (ISRO CS) questionsTheory of Computation, Compilers & Digital Logic (ISRO CS): notes and key points
More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions
- The complement of a context-sensitive language is
- A deterministic PDA with acceptance by empty stack (not final state) can accept only languages that are
- Very busy (anticipable) expressions analysis is of the type
- The intersection of two deterministic context-free languages is
- Which computational model recognizes exactly the class of regular languages?
- Which compiler phase reads the character stream and groups it into tokens?