The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes
consider the grammar G:   S->A|B        A->a|c      B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals.

Does LR(1) can parse all strings that are generated by grammar G.?

Please any one help me to how to check it?
asked in Compiler Design by (55 points) | 65 views
Only way is " Constructing the LR(1) items ", if there is no conflicts, then it is OK

Note that, it should be unambiguous grammar first !
@ shaik Masthan, I am new to this.will you please explain this example  in detail.
if you don't know about Bottom-Up parsers, just left it !

1 Answer

0 votes
The above given grammar is not LL(1) so it is not LR(1) as well. You can first check it for ll(1).
answered by (35 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,434 questions
53,630 answers
70,898 users