随笔-91  评论-137  文章-0  trackbacks-0
对于给定文法:
S->aAcBe
A->b
A->Ab
B->d
生成分析表得:
 1 LR(0)分析表为:
 2     a    c    e    b    d    #    S    A    B
 3 0    S2    ε    ε    ε    ε    ε    1    ε    ε
 4 1    ε    ε    ε    ε    ε    acc    ε    ε    ε
 5 2    ε    ε    ε    S4    ε    ε    ε    3    ε
 6 3    ε    S5    ε    S6    ε    ε    ε    ε    ε
 7 4    R2    R2    R2    R2    R2    R2    ε    ε    ε
 8 5    ε    ε    ε    ε    S8    ε    ε    ε    7
 9 6    R3    R3    R3    R3    R3    R3    ε    ε    ε
10 7    ε    ε    S9    ε    ε    ε    ε    ε    ε
11 8    R4    R4    R4    R4    R4    R4    ε    ε    ε
12 9    R1    R1    R1    R1    R1    R1    ε    ε    ε
posted on 2010-07-11 17:05 lwch 阅读(1490) 评论(0)  编辑 收藏 引用 所属分类: NScript

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   博问   Chat2DB   管理