0
I have the following production: S if E then S Else S fi | if E then S fi | K
Considering ε as the empty sentence, which would be a valid substitution to obtain an equivalent grammar that is LL(1)?
0
I have the following production: S if E then S Else S fi | if E then S fi | K
Considering ε as the empty sentence, which would be a valid substitution to obtain an equivalent grammar that is LL(1)?
Browser other questions tagged compilers
You are not signed in. Login or sign up in order to post.
Can you specify further what is the question you have? What have you tried to do? Because you need an LL(1 grammar)?
– hugomg
The grammar above has to be converted to LL(1). I tried to use methods to make the replacements valid. I need these methods because the production generates an intersection between First(αβ) and First(αδ) (two "First"), which is not valid for LL(1).
– Fábio Adriano
I seem to have found the answer: [breakline]S if E then S R fi | K [breakline] R Else S | ε
– Fábio Adriano