手机版

编译原理 龙书答案(9)

发布时间:2021-06-08   来源:未知    
字号:

编译原理 龙书答案

a/b] } = I6

goto(I1, a) = I3, goto(I1, b) = {[S→b , a/b]} = I7

goto(I2, S) = {[S→AS , $/a/b], [A→S A, a/b], [A→ SA, a/b], [A→ a, a/b], [S→ AS, a/b], [S→ b, a/b] } = I8

goto(I2, A) = I2, goto(I2, a) = I3, goto(I2, b) = I4 goto(I5, S) = I5, goto(I5, A) = I6, goto(I5, a) = I3, goto(I5, b) = I7

goto(I6, S) = {[S→AS , a/b], [A→S A, a/b], [A→ SA, a/b], [A→ a, a/b], [S→ AS, a/b], [S→ b, a/b] } = I9

goto(I6, A) = {[S→A S, a/b] , [S→ AS, a/b], [S→ b, a/b], [A→ SA, a/b], [A→ a, a/b] } = I10 goto(I6, a) = I3, goto(I6, b) = I7 goto(I8, S) = I5, goto(I8, A) = I6, goto(I8, a) = I3, goto(I8, b) = I7 goto(I9, S) = I5, goto(I9, A) = I6, goto(I9, a) = I3, goto(I9, b) = I7 goto(I10, S) = I9, goto(I10, A) = I10, goto(I10, a) = I3, goto(I10, b) = I7 规范LR分析表为:

f) 利用LR(1)项目集合并的方法构造LALR分析表 解:

同心集合并:

I2 10 = {[S→A S, $/a/b] , [S→ AS, $/a/b], [S→

b, $/a/b], [A→ SA, a/b], [A→ a, a/b] } I47 = {[S→b , $/a/b]}

I89 = {[S→AS , $/a/b], [A→S A, a/b], [A→ SA, a/b], [A→ a, a/b], [S→ AS, a/b], [S→ b, a/b] }

编译原理 龙书答案(9).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
×
二维码
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)