Project ForgeSign up free
Compiler Design
Lexical Analysis & Parsing
GATE 2016
Medium

Match the following:

(P) Lexical analysis (Q) Top down parsing (R) Semantic analysis (S) Runtime environments

(i) Leftmost derivation (ii) Type checking (iii) Regular expressions (iv) Activation records

  • AP↔i, Q↔ii, R↔iv, S↔iii
  • P↔iii, Q↔i, R↔ii, S↔iv
  • CP↔ii, Q↔iii, R↔i, S↔iv
  • DP↔iv, Q↔i, R↔ii, S↔iii

Explanation

Lexical analysis uses regular expressions to define tokens (P-iii). Top-down parsing corresponds to leftmost derivation (Q-i). Semantic analysis includes type checking (R-ii). Runtime environments manage activation records/stack frames (S-iv).

Source: GATE CS 2016 (Session 2 / Set B) (2016)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free