COMPILER DESIGN

INTRODUCTION TO COMPILER DESIGN

KEY COMPONENTS OF A COMPILER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which one of the following is a top-down parser?
A
Recursive descent parser.
B
Operator precedence parser.
C
An LR(k) parser.
D
An LALR(k) parser
Explanation: 

Detailed explanation-1: -Predictive parser and recursive descent parser are example of top-down parser. Whereas LR(k) and LALR(k) parser are bottom up parser.

Detailed explanation-2: -Explanation: Top-down parser generates the left-most derivation. It constructs the parse tree from left to right and constructs the left-most derivation of the specified sentence.

Detailed explanation-3: -Recursive Descent Parser uses the technique of Top-Down Parsing without backtracking. It can be defined as a Parser that uses the various recursive procedure to process the input string with no backtracking. It can be simply performed using a Recursive language.

There is 1 question to complete.