0 votes 0 votes it is confirmed that every LL(1) is LR(1) i.e CLR(1),but i want to know that is every LL(1) grammar is also LALR????? becz LALR is subset of CLR(1). Compiler Design compiler-design parsing lr-parser ll-parser + – eyeamgj asked May 16, 2018 retagged Jun 18, 2022 by Lakshman Bhaiya eyeamgj 285 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes No, It is not the case. But I assume this would not give you much intuition as it is more of a "by-heart" kind of thing. So, Try to find some Counter example which is LL(1) but not LALR(1) Or Refer here : https://stackoverflow.com/questions/6487588/example-for-ll1-grammer-which-is-not-lalr Deepak Poonia answered May 17, 2018 Deepak Poonia comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes Set of $LL(1)$ grammars is a proper subset of the set of $LR(1)$ grammars. $\color{magenta} \epsilon$ free $LL(1)$ grammars are $SLR(1)$ grammars. So they are $LALR(1)$ too. Now among those grammars that contain $\epsilon$ productions, If the symbols of that grammar have both empty as well as non-empty derivations, then that grammar is $LALR(1)$ too. But if any symbol contain only empty derivation then that grammar may or may not $LALR(1).$ So set of $LL(1)$ grammars is not subset of the set of $LALR(1)$ grammars. Soumya29 answered May 17, 2018 Soumya29 comment Share Follow See all 0 reply Please log in or register to add a comment.