Which one of the following statements is FALSE?
Topic-wise GATE CS PYQs with verified steps
GATE CSE 2018 · Q8
Time
Select one answerSingle correct
Solution
Official answer: B) Type checking is done before parsing.
Lexical Analysis, Parsing and SDTLet us evaluate the statements:
Option A: Context-free grammars (CFGs) are more expressive than regular grammars, so a CFG can be used to describe regular languages (tokens/lexical rules) as well as syntactic structures (syntax rules). This statement is true.
Option B: In the standard compiler pipeline, Type checking is performed during the Semantic Analysis phase, which occurs after the syntax analysis (parsing) phase, using the parse tree / abstract syntax tree constructed by the parser. Hence, type checking is done *after* parsing, making this statement FALSE.
Option C: High-level language code can be translated into various intermediate representations (IR) such as abstract syntax trees, DAGs, quadruples, triples, or 3-address code. This statement is true.
Option D: In runtime environments, arguments to a function are typically pushed onto the call stack (program stack) in the activation record. This statement is true.
Therefore, statement B is the false statement.
Try the question first, then check your work.
Examiner trap
Consider the phases of a compiler in sequential order: Lexical Analysis Syntax Analysis (Parsing) Semantic Analysis (Type Checking) Intermediate Code Generation.
This Lexical Analysis, Parsing and SDT previous year question is Q8 of the GATE CSE 2018 paper. Find more GATE CSE PYQs on Lexical Analysis, Parsing and SDT in Compiler Design, or browse all GATE CSE PYQs.
Free diagnostic
Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Lexical Analysis, Parsing and SDT PYQs now with no account.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
Lexical Analysis, Parsing and SDT has 14 GATE CSE PYQs across 12 papers from 2011 to 2025. 9 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2018.
How GATE tests Lexical Analysis, Parsing and SDTIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.