SYNTAX ANALYSIS
ERROR RECOVERY IN SYNTAX ANALYSIS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Is the grammar LL or SLR? Given Grammar F
|
LL(1)
|
|
SLR
|
|
Either A or B
|
|
None of the above
|
Explanation:
Detailed explanation-1: -In formal language theory, an LL grammar is a context-free grammar that can be parsed by an LL parser, which parses the input from Left to right, and constructs a Leftmost derivation of the sentence (hence LL, compared with LR parser that constructs a rightmost derivation).
Detailed explanation-2: -The only difference between LR(0) and SLR(1) is this extra ability to help decide what action to take when there are conflicts. Because of this, any grammar that can be parsed by an LR(0) parser can be parsed by an SLR(1) parser. However, SLR(1) parsers can parse a larger number of grammars than LR(0).
There is 1 question to complete.