Is this grammar LL(1) ?
17 Sep 2005 13:47:52 -0400

          From comp.compilers

Related articles
Is this grammar LL(1) ? (2005-09-17)
Re: Is this grammar LL(1) ? (Hans-Peter Diettrich) (2005-09-22)
Re: Is this grammar LL(1) ? (J.H.Jongejan) (2005-09-22)
| List of all articles for this month |

Newsgroups: comp.compilers
Date: 17 Sep 2005 13:47:52 -0400
Keywords: LL(1), question
Posted-Date: 17 Sep 2005 13:47:52 EDT

i've a question about this grammar

F->'c',F | epsilon.
A_1->'d',A_1 | epsilon.

is this grammar LL(1)?

my first and follow list

First(E) = {a}
First(F) = {c,epsilon}
First(A) = {d}
First(A_1) = {d,epsilon}

Follow(E) = {}
Follow(F) = {d,b}
Follow(A) = {c,d,b}
Follow(A_1) = {c,d,b}

sp I see, that in Follow(A_1) and First(A_1) is a problem because of
same terminal 'd'.

So my question is:

1) is my follow list correct?
2) when 1) is true, why isn't my grammar LL(1), it isn't leftrecursivea
nd how can I change this one?

André Betz

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.