2,448 views

4 Answers

1 1 vote
No, Every unambiguous grammar need not be LR(0) grammar. But the converse is true means every LR(0) grammar is unambiguous.LR(0) grammar is a proper subset of SLR(1) grammar and both are unambiguous grammar only. So we can conclude there exist some unambiguous grammar which are SLR(1) but not LR(0).
0 0 votes
No, this is not true. As, all LR(1) grammars are unambiguous, and some LR(1) grammars are not LR(0) , so this implies that some unambiguous LR(1) grammars are not LR(0).
0 0 votes

@samarpita

No, this is not true...

LR parsing is not a useful technique for human languages with ambiguous grammars that depend on the interplay of words...

Human languages are better handled by ...

 

1. https://gatecse.in/lr-parsing-part-2-language-of-ll-and-lr-grammars 

 

2. https://gateoverflow.in/91352/Can-lr-1-parser-parse-any-context-free-grammar-language 

 

3. https://gateoverflow.in/105785/Ll-k-grammars 

 

4. https://web.stanford.edu/class/archive/cs/cs143/cs143.1128/handouts/090%20Top-Down%20Parsing.pdf

 

  5. https://en.wikipedia.org/wiki/LR_parser

 

 

Position:
Show:

Related questions

0 0 votes
1 1 answer
1.6k
1.6k views
aditi19 asked Mar 25, 2019
1,636 views
Can lookahead symbol be epsilon in LR(1) parsing?andpls give the LR(1) diagram for the following grammar?A->AB | aB->*AC | Cb | ∈C->+ABc | ∈
0 0 votes
0 0 answers
619
619 views
sushmita asked Dec 31, 2018
619 views
WHAT IS A VALID ITEM FOR A VIABLE PREFIX?CAM SOMEONE EXPLAIN IN EASY WAY.
0 0 votes
2 2 answers
821
821 views
Raj Kumar 7 asked Dec 30, 2018
821 views
S → aA / CBA → BaA / epsilonB → bB / Abc / epsilonC → Bwhat is follow of C , FOLLOW(C)?I think answer is FOLLOW (C) = First(B) = { b, first (A), (dollar for epsilon) }...
0 0 votes
1 1 answer
1.0k
1.0k views
manisha11 asked Oct 21, 2018
1,031 views
Can we comment/compare the number of GOTO moves inLALR and CLRCLR and SLR?