【问题标题】:How to find the follow of the following grammar如何找到以下语法的后续
【发布时间】:2016-05-05 19:11:14
【问题描述】:

语法

S->(A)
A->CB
B->;A|ε
C->x|S

我找到了语法的First

First(S)={(}
First(B)={;,ε}
First(C)={x,(}
First(A)=First(C)={x,(}

我找不到语法的Follow

【问题讨论】:

    标签: parsing compiler-construction language-agnostic ll


    【解决方案1】:

    Follow 集是

    Follow(S)={$,),;} Follow(B)={)}

    Follow(C)={:,)}

    Follow(A)={)}

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-11-22
      • 1970-01-01
      • 2018-01-07
      • 2018-06-30
      • 2020-10-08
      • 1970-01-01
      • 2014-11-15
      相关资源
      最近更新 更多