It's really important to me, so please help me.
Is this grammar LL(1)?
S -> LAB
L -> d | ε
A -> dA | Ba
B -> Bb | ε
can anyone help me with LL(1) parsing table?
Am I right about this?
first(S) = {a,b,d}
first(L) = {d}
first(A) = {b,d}
first(B) = {b}
follow(S) = {$}
follow(L) = {a,b,d}
follow(A) = {b,$}
follow(B) = {$}
I used the JFLAP tool on your grammar. JFLAP does not think your grammar is LL(1), but can try and build a parse table for it.
You could experiment with the grammar in JFLAP to make it LL(1) conformant.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.