TOOLS AND TECHNIQUES FOR COMPILER DESIGN
MISCELLENOUS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Left to Right derivation
|
|
Left to Right with Rightmost derivation
|
|
Left to Right with Leftmost derivation
|
|
None of the above
|
Detailed explanation-1: -An LR parser (Left-to-right, Rightmost derivation in reverse) reads input text from left to right without backing up (this is true for most parsers), and produces a rightmost derivation in reverse: it does a bottom-up parse – not a top-down LL parse or ad-hoc parse.
Detailed explanation-2: -In the LR parsing, “L” stands for left-to-right scanning of the input. “R” stands for constructing a right most derivation in reverse. “K” is the number of input symbols of the look ahead used to make number of parsing decision.
Detailed explanation-3: -In computer science, an LL parser (Left-to-right, leftmost derivation) is a top-down parser for a restricted context-free language. It parses the input from Left to right, performing Leftmost derivation of the sentence. An LL parser is called an LL(k) parser if it uses k tokens of lookahead when parsing a sentence.