I want to remove the epsilon production from the following grammar:

                                 S → [ S ] | SS | ε
  • 2
    $\begingroup$ Based only on the given, I think you cannot remove the epsilon without changing the language of the grammar, since the grammar can derive the empty string (epsilon). If in case the empty string is not needed then simply remove the epsilon production and add [ ] in your rule. If you need some general rule for removing epsilon production check this cs.stackexchange.com/questions/67915/… $\endgroup$ – Russel Apr 9 at 4:18
  • $\begingroup$ I should have said Epsilon Production not transition $\endgroup$ – Derek C Apr 9 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.