求文法 E->TG G->+TG G->ξ T->FS S->*FS S->ξ F->(E) F->i 的first集和follow集
时间: 2023-12-30 15:04:23 浏览: 153
求first集和follow集
4星 · 用户满意度95%
First集:
First(E) = { (, i }
First(G) = { +, ε }
First(T) = { (, i }
First(S) = { *, ε }
First(F) = { (, i }
Follow集:
Follow(E) = { $, ) }
Follow(G) = { $, ) }
Follow(T) = { +, $, ), }
Follow(S) = { +, $, ), }
Follow(F) = { *, +, $, ), }
阅读全文