编译技术编译原理 (20).pdf
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_1.gif)
![资源得分’ title=](/images/score_05.gif)
《编译技术编译原理 (20).pdf》由会员分享,可在线阅读,更多相关《编译技术编译原理 (20).pdf(20页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、编译技术语 法 分 析温故而知新任何两个产生式A|都满足下列条件:1、FIRST()FIRST()=2、若 *,那么FIRST()FOLLOW(A)=上下文无关文法自上而下自下而上LL(1)文法2个函数递归下降预测分析非递归的预测分析最左推导递 归 的 分 析 程 序SBAABS|dBaA|bS|cS()B();A();A()if(lookahead=a|b|c)B();S();elsematch(d);B()if(lookahead=a)match(a);A();else if(lookahead=b)match(b);S();elsematch(c);递归下降的预测分析 为每一个非终结符写
2、一个分析过程 这些过程可能是递归的递 归 下 降 的 预 测 分 析例:type simple|id|array simple of typesimple integer|char|num dotdot num递 归 下 降 的 预 测 分 析一个辅助过程void match(terminal t)if(lookahead=t)lookahead=nextToken();else error();递 归 下 降 的 预 测 分 析void type()if(lookahead=integer)|(lookahead=char)|(lookahead=num)simple();else if(l
3、ookahead=)match();match(id);else if(lookahead=array)match(array);match();simple();match();match(of);type();else error();type simple|id|array simple of type递 归 下 降 的 预 测 分 析void simple()if(lookahead=integer)match(integer);else if(lookahead=char)match(char);else if(lookahead=num)match(num);match(dotdo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 编译技术编译原理 20 编译 技术 原理 20
![提示](https://www.deliwenku.com/images/bang_tan.gif)
限制150内