edited by
639 views
0 votes
0 votes

Consider the following statements.

S1: An unambiguous left recursive grammar must be CLR(1).

S2: A DCFG may or may not be LL(1).

Select the correct option:

1.Both S1 and S2 are true.

 

2.Both S1 and S2 are false.

 

3.  S1 is false and S2 is true.

 

4.S1 is true and S2 is false.

 

According to me S1 false and S2 true but answer given 1

edited by

1 Answer

0 votes
0 votes
option 3

S1 is false: CLR(1) parses proper subset of Unambiguous grammars.

S2 is true:  DCFL has1:1 correspondence with CLR(1). So DCFG will be LR(1) but may may not be LL(1)

Related questions

0 votes
0 votes
0 answers
1
0 votes
0 votes
0 answers
3