Computer Sciences > GATE 2026 SET-2 > Compiler Design
A lexical analyzer uses the following token definitions
ο‚· π‘™π‘’π‘‘π‘‘π‘’π‘Ÿβ†’[π΄βˆ’π‘π‘Žβˆ’π‘§]
ο‚· 𝑑𝑖𝑔𝑖𝑑→[0βˆ’9]
ο‚· π‘–π‘‘β†’π‘™π‘’π‘‘π‘‘π‘’π‘Ÿ (π‘™π‘’π‘‘π‘‘π‘’π‘Ÿ | 𝑑𝑖𝑔𝑖𝑑)*
ο‚· π‘›π‘’π‘šπ‘π‘’π‘Ÿβ†’π‘‘π‘–π‘”π‘–π‘‘+
ο‚· 𝑀𝑠→(π‘π‘™π‘Žπ‘›π‘˜ | π‘‘π‘Žπ‘ | 𝑛𝑒𝑀𝑙𝑖𝑛𝑒)+
For the string given below,
x1 23π‘šπ‘š 78 𝑦 7𝑧 𝑧𝑧5 14𝐴 8𝐻 π΄π‘Žπ‘Œπ‘π·
the number of tokens (excluding 𝑀𝑠) that will be produced by the lexical analyzer is __________. (answer in integer)

Correct : 13

Similar Questions

Match the following according to input(from the left column) to the compiler phase(in the right column) that process it: (P)Syntax Tree (i)...
#168 MCQ
Consider the following code segment. x = u - t; y = x * v; x = y + w; y = t - z; y = x * y; The minimum number of total variables required to convert the abo...
#575 Fill in the Blanks
Consider the following grammar: stmt -> if expr then else expr; stmt | Ξ΅ expr -> term relop term | term term -> id | number id -> a | b | c number -> [...
#594 Fill in the Blanks

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......