1. >GATE CS
  2. >Compiler Design
Found 1  QuestionSET DEFAULT
Selected Filters
    GATE CS Compiler Design Lexical Analysis
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