in Compiler Design edited by
660 views
2 votes
2 votes
Q if any Grammar is LL(1) definitely LALR(1) ?

It is true or false

Please ans explain  in detail.
in Compiler Design edited by
660 views

2 Answers

1 vote
1 vote
if any Grammer is LL(1) then it compulsory BUP that means must be CLR(1) , powerful one of BUP definitely satisfy but there is no guarantee of LALR(1).

bcoz BUP is  more powerful than TDP.that means atleast most powerful person must satisfy
0 votes
0 votes
False! each LL(1) is CLR(1) but each CLR(1) may or may not be LALR(1). I think there is no relation b/w LL(1) and LALR(1) but LL(1) are proper subet of CLR(1).

Note that, every epsilon free LL(1) grammar is LALR(1).
edited

3 Comments

LALR is a LR parser uses LALR(1) language, and LL are proper subset of LR languages then, it should be true. ryt.
0
0
Among the various LR parsers, only CLR(1) is the strongest of all. So every LL(1) grammar is CLR(1). However, only a proper subset of LALR(1) grammars is LL(1).
0
0
Can you explain explain with example which LL(1) but not LALR(1)
0
0