LALR is more powerful than LR a. True b. *False Consider the following grammar.
ID: 3727930 • Letter: L
Question
LALR is more powerful than LR a. True b. *False Consider the following grammar. S-aAbB | Bc , A aAa l a , B Bb | Ab | CC | AC , C c , calculate Follow(B) b. (a) c.* $, b, c) d. All of the answers above are incorrect Consider the following grammar: S A-B), A B l a) , B aB I a , if you convert the LR(1) automata to LALR(1), will any state be merged into another state? a. Yes b. No Consider the following grammar. S A-B) , A B | a) , B aB | a , calculate Follow(B) O c d. All of the answers above are incorrect Assume two LR states 11 and 12 are merged into an LALR state l: a. This may introduce shift-reduce conflict b. This may introduce reduce-reduce conflict c. Both a and b are incorrect d. Both a and b are correctExplanation / Answer
1) Yes LALR is more powerful than LR parser.
2) {$,b,c} All are Follow of B
Since in every rule we can see B is followed by them.
3) Yes they will be merged. Since in Look aheads we have $ and b for some symbols.
4) All are incorrect since it will never be followed by $
5) This ma introduce reduce-reduce conflict
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.