GATE Compiler Design: Lexical Analysis – Previous Year Questions
11 GATE previous year questions on Lexical Analysis (Compiler Design, Computer Science) with answers and explanations, from every paper.
11 questions worth 12 marks in all (10 1-mark, 1 2-mark). Asked between 2010 and 2026, so you can see how the topic has been tested over time.
- GATE 2010 CS Q23 – Which compiler structure manages information about variables and their attributes?
- GATE 2011 CS Q11 – A compiler recognizes language keywords during
- GATE 2011 CS Q29 – Which machine model is necessary and sufficient for lexical analysis of a modern language such as Java?
- GATE 2017 CS (CS2) Q15 – Match compiler inputs P: syntax tree, Q: character stream, R: intermediate representation, S: token stream, to phases (i) code generator, (ii) syntax…
- GATE 2016 CS (CS2) Q29 – Match P: lexical analysis; Q: top-down parsing; R: semantic analysis; S: runtime environments, with (i) leftmost derivation, (ii) type checking, (iii)…
- GATE 2018 CS Q47 – A lexical analyzer uses the following patterns to recognize three tokens T 1, T 2, and T 3 over the alphabet \a,b,c\. T 1: a?(b c)*a T 2: b?(a c)*b T…
- GATE 2026 CS (CS2) Q35 – A lexical analyzer uses the following token definitions: - letter [A-Za-z] - digit [0-9] - id letter(letter digit)* - number digit+ - ws (blank tab…
- GATE 2026 CS (CS1) Q27 – Consider the following C statements: Which of the following statements is/are true?
- GATE 2025 CS (CS1) Q12 – Which ONE of the following statements is FALSE regarding the symbol table?
- GATE 2023 CS Q11 – Consider the following statements regarding the front-end and back-end of a compiler. S1: The front-end includes phases that are independent of the…
- GATE 2023 CS Q19 – Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions: letter →…