I am trying to build a LL(1) parse table for the following Grammargrammar:
S -> L
L -> L : L
L -> id R
R -> ( L )
R -> ( )
R -> Epsilon
S -> L
L -> L : L
L -> id R
R -> ( L )
R -> ( )
R -> Epsilon
There are two Problemsproblems here. First, the LL
rules are a left recursion and the RR
rules have ((
as the same prefix.
So
So I modified the Grammar to this one:
S -> L
L -> id R X
X -> : L X
X -> Epsilon
R -> ( P
R -> Epsilon
P -> L )
P -> )
S -> L
L -> id R X
X -> : L X
X -> Epsilon
R -> ( P
R -> Epsilon
P -> L )
P -> )
I then checked the Grammargrammar with the JFLAP Tool and it says that my grammar is not LL(1). But I just don't see the Problemproblem.
Can somebody help me out here?
regards Alex