GATE 2016 CS (CS2) – Question 29
Match P: lexical analysis; Q: top-down parsing; R: semantic analysis; S: runtime environments, with (i) leftmost derivation, (ii) type checking, (iii) regular expressions, (iv) activation records.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (B) P–iii, Q–i, R–ii, S–iv
Explanation
Lexical analysis recognizes tokens using regular expressions, P–iii. Top-down parsing constructs leftmost derivations, Q–i. Semantic analysis performs type checking, R–ii. Runtime procedure environments use activation records, S–iv. Therefore B.