MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which tool is used as scanner generator in compiler?
A
LEX
B
YACC
C
SDT
D
Finite Automata
Explanation: 

Detailed explanation-1: -Flex (Fast Lexical Analyzer Generator )

Detailed explanation-2: -Scanner Generator – It generates lexical analyzers from the input that consists of regular expression description based on tokens of a language. It generates a finite automaton to recognize the regular expression.

Detailed explanation-3: -LEX helps by taking a set of descriptions of possible tokens n producing a routine called a lexical analyzer or LEXER or Scanner.

Detailed explanation-4: -lex and yacc are a pair of programs that help write other programs. Input to lex and yacc describes how you want your final program to work. The output is source code in the C programming language; you can compile this source code to get a program that works the way that you originally described.

There is 1 question to complete.