1. Home
  2. GATE CS
  3. Compiler Design

Filters

Found 1 Question

Set Default
Exams
Years
Subjects
Topics

List of top Compiler Design Questions on Lexical Analysis asked in GATE CS

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\ \ 23mm\ \ 78\ \ y\ \ 7z\ \ zz5\ \ 14A\ \ 8H\ \ AaYcD \]
the number of tokens (excluding \(ws\)) that will be produced by the lexical analyzer is ______.
  • GATE CS - 2026
  • GATE CS
  • Compiler Design
  • Lexical Analysis
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited