递归下降分析 (54).ppt
《递归下降分析 (54).ppt》由会员分享,可在线阅读,更多相关《递归下降分析 (54).ppt(7页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、Compiler ConstrucionS1Generation of Target CodeInvolves two standard techniques1.Macro expansionReplaces each intermediate code instruction with an equivalent sequence of target code instructions.2.Static simulationStraight-line simulation of the effects of the intermediate code and generating targe
2、t code to match these effects.Compiler ConstrucionS2Exampleexp id=exp|aexpaexp aexp+factor|factorfactor (exp)|num|idlda xlod xldc 3adistnldc 4adit1=x+3x=t1t2=t1+4(x=x+3)+4Compiler ConstrucionS3Static Simulationlda xlod xldc 3adistnldc 4adiaddress of xx3top of stackt1=x+3address of xt1top of stackCom
3、piler ConstrucionS4Static Simulationlda xlod xldc 3adistnldc 4adix=t1address of xt1top of stackt1top of stackCompiler ConstrucionS5Static Simulationlda xlod xldc 3adistnldc 4adit2=t1+44t1top of stackt2top of stackt1=x+3x=t1t2=t1+4Compiler ConstrucionS6Exampleexp id=exp|aexpaexp aexp+factor|factorfactor (exp)|num|idlda xlod xldc 3adistnldc 4adit1=x+3x=t1t2=t1+4(x=x+3)+4Compiler ConstrucionS7Macro Expansiont1=x+3x=t1t2=t1+4lda t1lod xldc 3adistolda xlod t1stolda t2lod t1ldc 4adistolda t1lod xldc 3adistolda xlod t1stolda t2lod t1ldc 4adistot1=x+3x=t1t2=t1+4
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 递归下降分析 54 递归 下降 分析 54
限制150内