GATEverse
← GATE CSE 2026 Set 2

Q25

NAT1 mark

A lexical analyzer uses the following token definitions letter→[A−Za−z]{letter → [A-Za-z]} digit→[0−9]{digit → [0-9]} id→letter(letter∣digit)∗{id → letter (letter | digit)^*} number→digit{number → digit} +{ }^{+} ws→(blank∣tab∣newline){ws → (blank | tab| newline)} +{ }^{+} For the string given below,

x123 mm78 y 7z zz5 14A8H AaYcD x1 \quad 23 \mathrm{~mm} \quad 78 \quad \text{ y } \quad 7 z \quad \text { zz5 } \quad 14 A \quad 8 H \quad \text { AaYcD }

the number of tokens (excluding ws) that will be produced by the lexical analyzer is ____\_\_\_\_. (answer in integer)

Sign in to save attempts.

Loading…