COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
output of lex program is
A
lex.c
B
lex.yy.c
C
lex.l
D
lex.yy.l
Explanation: 

Detailed explanation-1: -The “yy” in lex. yy. c indicates that the lex output is intended for a yacc parser.

Detailed explanation-2: -The output file generated by Lex is typically a C or C++ source file that implements the lexical analyzer. The input file for Lex is typically a specification file that describes the lexical structure of the input language.

Detailed explanation-3: -yylex() returns a value indicating the type of token that has been obtained. If the token has an actual value, this value (or some representation of the value, for example, a pointer to a string containing the value) is returned in an external variable named yylval.

There is 1 question to complete.