You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read your code about removing useless symbols and productions. But I test some cases and don't know if this program can eliminate the epsilon production.
The productions of type S → ε are called ε productions. These type of productions can only be removed from those grammars that do not generate ε.
Firstly I guess the symbol ~ in your test files means the epsilon symbol, but the output result also has the epsilon. My test case is here, and the # means the epsilon symbol which should be removed.
4
a b c d
5
S A B C D
S -> a | bA | B | ccD
A -> abB | #
B -> aA
C -> ddC
D -> ddd
So can this program deal with the ε productions and remove unit productions, or it can only deal with removing useless symbols?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi Angel,
I have read your code about removing useless symbols and productions. But I test some cases and don't know if this program can eliminate the epsilon production.
The productions of type S → ε are called ε productions. These type of productions can only be removed from those grammars that do not generate ε.
Firstly I guess the symbol
~
in your test files means the epsilon symbol, but the output result also has the epsilon. My test case is here, and the#
means the epsilon symbol which should be removed.So can this program deal with the ε productions and remove unit productions, or it can only deal with removing useless symbols?
Thanks.
The text was updated successfully, but these errors were encountered: