Compiler Design Gate Smashers ~upd~ Now
The exam hall was a pressure cooker of silence, broken only by the rhythmic scratching of pens. Arjun stared at the booklet. Question 42: “Calculate the number of states in the Canonical LR (CLR) parser for the following grammar...”
Final Advice:
4. Typical Exam Questions & Strategies
- Derivations: Show leftmost/rightmost derivations and parse trees.
- Construct DFA from RE; minimize it.
- Compute FIRST/FOLLOW and build LL(1) parsing table.
- Given grammar, identify conflicts and convert to suitable parser or left-factor/left-recursion elimination.
- Write three-address code and apply optimizations.
- Short proofs: closure properties of regular languages; correctness arguments for transformations.
- Widening (int → float) – allowed.
- Narrowing (float → int) – may cause warning/error.