Compiler Design · Previous year questions
Lexical Analysis
10 questions from GATE CS 2011 to 2026, newest first.
Questions
GATE CS 2026 Set 1, Q.27
Consider the following C statements: char str1 = "Hello; / Statement S1 */ char str2 = "Hello;"; / Statement S2 */ int str3 = "Hello"; / Statement S3 */ Which of the follo...
Lexical Analysis
GATE CS 2026 Set 2, Q.35
A lexical analyzer uses the following token definitions - - - -…
Lexical Analysis
GATE CS 2025 Set 1, Q.12
Which ONE of the following statements is FALSE regarding the symbol table?
Lexical Analysis
GATE CS 2024 Set 2, Q.21
Consider the following two sets: Set X Set Y P. Lexical Analyzer 1. Abstract Syntax Tree Q. Syntax Analyzer 2. Token R. Intermediate Code Generator 3. Parse Tree S. Code Optimiz...
Lexical Analysis · Parsing and Syntax Analysis (LL and LR) · Intermediate Code Generation, Data Flow Analysis and Code Optimization
GATE CS 2023, Q.19
Consider the following definition of a lexical token id for an identifier in a programming language, using extended regular expressions…
Lexical Analysis
GATE CS 2018, Q.47 (CS Q.37)
A lexical analyzer uses the following patterns to recognize three tokens T1, T2, and T3 over the alphabet .…
Lexical Analysis
GATE CS 2017 Set 2, Q.5 (CS Q.5)
Match the following according to input (from the left column) to the compiler phase (in the right column) that processes it: | Input | Compiler Phase | | :--- | :--- | | (P) Syn...
Lexical Analysis · Parsing and Syntax Analysis (LL and LR)
GATE CS 2016 Set 2, Q.29 (CS Q.19)
Match the following: (P) Lexical analysis (Q) Top down parsing (R) Semantic analysis (S) Runtime environments (i) Leftmost derivation (ii) Type checking (iii) Regular expression...
Lexical Analysis
GATE CS 2011, Q.1 (CS Q.1)
In a compiler, keywords of a language are recognized during
Lexical Analysis
GATE CS 2011, Q.19 (CS Q.19)
The lexical analysis for a modern computer language such as Java needs the power of which one of the following machine models in a necessary and sufficient sense?
Lexical Analysis