GATE CS 2026 (Afternoon) — Question 35

Compiler DesignLexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)NAT1 markMedium

A lexical analyzer uses the following token definitions • letter \(\rightarrow\) [A - Za - z] • digit \(\rightarrow\) [0 - 9] • id \(\rightarrow\) letter (letter \(|\) digit)\(*\) • number \(\rightarrow\) digit\(^+\) • ws \(\rightarrow\) (blank \(|\) tab \(|\) newline)\(^+\) For the string given below, x1 23 mm 78 y 7z zz5 14A 8H AaYcD the number of tokens (excluding ws) that will be produced by the lexical analyzer is ________. (answer in integer)
Practise the full 2026-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkCompilers: Principles, Techniques & ToolsThe "Dragon Book" for parsing, syntax-directed translation and code generation.
Practise more on Lexical Analysis & Parsing Architectures (LL(1), LR(1), LALR)Timed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group