0 votes 0 votes What is actual difference between in LALR(1) and CLR(1). please explain this by taking one example. Compiler Design compiler-design parsing lr-parser + – iamdeepakji asked Oct 10, 2018 • retagged Jun 18, 2022 by Lakshman Bhaiya iamdeepakji 302 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes No. of states in CLR(1) is greater than or equal to LALR(1) parser. If grammar is CLR(1), it may or may not be LALR(1), because conflict may arise when you will merge the states for constructing LALR(1) table. If grammar is not CLR(1), it will not be LALR(1), because already conflict happened in CLR(1) so the conflict will always present in LALR(1). If there is no SR conflict in CLR(1), there will be no SR conflict in LALR(1). If there is no RR conflict in CLR(1), we can't say about RR conflict in LALR(1) because there is a chance that when we merge the states, RR conflict may arise. abhishek tiwary answered Oct 21, 2020 abhishek tiwary comment Share Follow See all 0 reply Please log in or register to add a comment.