SYNTAX ANALYSIS
ERROR RECOVERY IN SYNTAX ANALYSIS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Top Down parser
|
|
Bottom Up Parser
|
|
LL(0)
|
|
LL(1) parser
|
Detailed explanation-1: -LR parsing is also a category of Bottom-up parsing. It is generally used to parse the class of grammars whose size is large. In the LR parsing, “L” stands for scanning of the input left-to-right, and “R” stands for constructing a rightmost derivation in a reverse way.
Detailed explanation-2: -Bottom up parsing is also known as shift-reduce parsing. Bottom up parsing is used to construct a parse tree for an input string. In the bottom up parsing, the parsing starts with the input symbol and construct the parse tree up to the start symbol by tracing out the rightmost derivations of string in reverse.
Detailed explanation-3: -The bottom-up parsing is based on the concept of LR(K) parsing. L stands for left-to-right parsing of the input string. R stands for construction of the rightmost derivation in reverse. K stands for the number of input symbols that the parser will look ahead for making a parsing decision.
Detailed explanation-4: -In computer science, LR parsers are a type of bottom-up parser that analyse deterministic context-free languages in linear time. There are several variants of LR parsers: SLR parsers, LALR parsers, Canonical LR(1) parsers, Minimal LR(1) parsers, and GLR parsers.