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)
ο· πππ‘π‘ππβ[π΄βππβπ§]
ο· πππππ‘β[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)...
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...
Consider the following grammar:
stmt -> if expr then else expr; stmt | Ξ΅
expr -> term relop term | term
term -> id | number
id -> a | b | c
number -> [...
Total Unique Visitors
Loading......