edited by
7,235 views
3 3 votes

consider the following statements:

S1:SLR parsing table have more number of state then LALR parsing table

S2:it is economical to construct SLR and LALR table than CLR parsing table .

Which one is true?

1 Answer

Best answer
7 7 votes

parser_21

  •  SLR parsing table have same number of states than LALR parsing table

             If number of states LR(0) = n1,
              number of states SLR = n2,
               number of states LALR = n3,
                 number of states CLR = n4 then,
                         n1 = n2 = n3 <= n4

  •    For a comparison of parser size , the SLR and LALR tables for a grammar always have the same number of states , and this number is typically several hundred states for a language like C. The CLR table would typically have several thousand states for the same size language. Thus , it is much easier and more economical to construct SLR and LALR tables than CLR tables.

So S2 is true.

selected by
Position:
Show:

Related questions

0 0 votes
1 1 answer
517
517 views
gopal_gate asked May 24, 2025
517 views
Consider the following grammar. Note that the grammar is not left recursive, and so it is suitable for the recursive descent parsing. Also, you should know that the gramm...
0 0 votes
1 1 answer
1.5k
1.5k views
Nandkishor3939 asked Jan 24, 2019
1,547 views
Does RDP require back tracking ?I am asking this because I have read that if RDP doesn't require back tracking then it is a predictive parser(LL(1))!! A predictive parser...
1 1 vote
4 answers 4 answers
4.8k
4.8k views
Rahul_Rathod_ asked Jan 21, 2019
4,816 views
grammar is CLR(1) or not?if yes then how?
2 2 votes
0 0 answers
1.7k
1.7k views
Na462 asked Jan 19, 2019
1,703 views
Which one of the following is true about LALR(1) Parser ?It can resolve SR Conflict in favor of reducedIt can resolve SR Conflict in favor of ShiftIt can resolve RR Confl...