[ACCEPTED]-SLR(1) Parser and epsilon involved-language-theory
Accepted answer
I agree with Howard. Your state in the DFA 3 should contain the item: x → .
Here's a DFA I 2 drew for an SLR(1) parser that recognizes 1 a grammar that uses two epsilon productions:
Since ϵ
is not a terminal itself you have 4 to remove it from your rule which gives 3 you
X → .
Then later you won't have any strange 2 GOTO
with "symbol" ϵ
but instead your state
S' → S.
is 1 an accepting state in your graph.
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.