On Feb 7, 8:54 pm, Mayur Mahrotri <mayurmahro...@gmail.com> wrote:
> Thanks Sir,
>
> Also, i wanted to know, the method to recognise, LR(0) and SLR(1) grammars.
>
> Can you also, explain me this :
> Someone told me that CLR is the highest class of grammars which can parse
> any grammar including ambiguous grammars.
>
> Is this true ?
>
> On 2/5/10, venkat rao <toc.ven...@gmail.com> wrote:
>
>
>
> > HI mayur,
> > LR(1) means CLR(1)
>
On Feb 8, 11:06 pm, Mayur Mahrotri <mayurmahro...@gmail.com> wrote:
> LR(0) is not equal SLR(1), for that i am sure.
>
> On Sun, Feb 7, 2010 at 11:21 AM, shripad sarade <shripad.sar...@gmail.com>wrote:
>
>
>
>
>
>
>
> > CLR(1) LALR(1) SLR(1) LR(0) LL(1)
> > They do not include Ambiguous grammar.
>
On Feb 9, 2:36 pm, Mayur Mahrotri <mayurmahro...@gmail.com> wrote:
> How do you check then, whether the grammar is LR(0) and SLR(1). ? I
> constructed all the LR(0) items, then ?
>
On Feb 9, 7:56 pm, Mayur Mahrotri <mayurmahro...@gmail.com> wrote:
> Sorry for the typo, correct the line :
>
> "Without lookahead, we don't know the replacement for S"
>
> On Tue, Feb 9, 2010 at 8:24 PM, Mayur Mahrotri <mayurmahro...@gmail.com>wrote:
>
>
>
>
>
> > Yeah, i know this method, but was doubtful about it. Thats why i asked.
>
> > On this grounds, can you solve this question and confirm :
>
> > Q. The grammar S -> while (E) s | a
> > E -> a
> > is for nested while statements. This grammar is :
> > (A) is not LR(1) (B) is not SLR(1) (C) is not LALR(1) (D) is not LR(0)
>
> > This was asked in the Gateforum test paper 69. The answer given here is (D)
> > and the explanation is "Without lookahead, we don't know the replacement for
> > x"
>
> > When, solving i did not get any inadequate state. Please solve this and let
> > me know.
>
> > Thanks for you input, Varun. :)
>