A lexical analyzer uses the following token definitions
letter → [A - Za - z]
digit → [0-9]
id → letter (letter $\mid$ digit)*
number → digit $^{+}$
ws → (blank | tab | newline) ${ }^{+}$
For the string given below,
$x1 \quad 23mm \quad 78\quad$ y $\quad7 z \quad z z 5 \quad 14 A \quad 8 H \quad A a Y c D$
the number of tokens (excluding ws) that will be produced by the lexical analyzer is
$\_\_\_\_$ . (answer in integer)
Consider the following C statements:
char str1 = "Hello; / Statement S1 */
char str2 = "Hello;"; / Statement S2 */
int str3 = "Hello"; / Statement S3 */
Which of the following options is/are correct?
Consider the following two sets:
Set X
P. Lexical Analyzer
Q. Syntax Analyzer
R. Intermediate Code Generator
S. Code Optimizer
Set Y
1. Abstract Syntax Tree
2. Token
3. Parse Tree
4. Constant Folding
Which one of the following options is the correct match from Set X to Set Y?
GATE CSE Subjects
Browse all chapters by subject