We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
输入:
7 A->E E->E+T E->T T->T*F T->F F->(E) F->i
使用哈工大的编译原理书 P106 的拓广文法 G[E] 把 E' 替换为 A, 输入以上的内容, 出现溢出的问题:
The text was updated successfully, but these errors were encountered:
如果出现了左递归的情况. 如 A->A+T 的情况, 就会溢出。 建议加上求 FIRST 顺序的代码。
Sorry, something went wrong.
@ddayzzz 学生时代写的啦, 欢迎提PR
哈哈。最近想了想。如果能够先把产生式右部的第一个符号就是终结符就可以先求出。这可能需要一个类似于拓扑排序的顺序来求各个非终结符的 FIRST. 看看能不能写一个 PR。 :)
No branches or pull requests
RT
输入:
使用哈工大的编译原理书 P106 的拓广文法 G[E] 把 E' 替换为 A, 输入以上的内容, 出现溢出的问题:
The text was updated successfully, but these errors were encountered: