COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
An LALR parser
|
|
An LR parser
|
|
Operator precedence parser
|
|
Recursive descent parser
|
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: -In computer science, a recursive descent parser is a kind of top-down parser built from a set of mutually recursive procedures (or a non-recursive equivalent) where each such procedure implements one of the nonterminals of the grammar.
Detailed explanation-3: -Which one of the following is a top-down parser? Explanation: Recursive Descent also known as top down parsing also known to be LL(1).
Detailed explanation-4: -A top-down parser that uses a one-token lookahead is called an LL(1) parser. The first L indicates that the input is read from left to right. The second L says that it produces a left-to-right derivation.
Detailed explanation-5: -Recursive Descent Parser − A top-down parser that implements a set of recursive procedures to process the input without backtracking is known as recursive-descent parser, and parsing is known as recursive-descent parsing.