Removing epsilon production from context-free grammar

≯℡__Kan透↙ 提交于 2019-12-13 04:25:00

问题


I am just having trouble with one part of the grammar that reads:

C -> CBA | epsilon

After I remove epsilon productions, I get:

C -> CBA | CB | BA | B | A

I'm confused as to whether this is correct or not. In the grammar, B is also a nullable variable. Do I also have to include CA and/or A in the latter grammar?

Any help appreciated.

来源:https://stackoverflow.com/questions/19920349/removing-epsilon-production-from-context-free-grammar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!