The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
79 views
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?
in Compiler Design by (45 points) | 79 views
0
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 !
0
@ shaik Masthan, I am new to this.will you please explain this example  in detail.
0
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).
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,807 questions
54,727 answers
189,302 comments
79,844 users