| 236 | 4 | 14 |
| 下载次数 | 被引频次 | 阅读次数 |
本文探讨如何在"编译原理"教学过程中形象地演示复杂的算法过程,提出了一个演示算法步骤的方案,展示算法步骤的进行以及步骤进行时的数据联动,对于不同的动作、不同意义的数据,用图形元素和颜色加以区分,并以LR分析算法为例说明了如何分解复杂步骤,如何用图形和颜色展示移进、归约、接受、出错等分析动作以及相关数据的变化。
Abstract:This paper explores how to visualize the algorithms in courses of teaching principles of compiler.A scheme is proposed to demonstrate the algorithm steps.The scheme shows the actions and datum using different graph elements and colors,and thus shows the algorithm steps and connected datum clearly.It is used to demonstrate LR parsing algorithm,showing how to decompose the complicated steps into sub-steps and use graph elements and colors to reveal the parsing actions,such as shift,reduce,accepting and errors,and connected datum are showing simultaneously.
[1]Alfred V.Aho.Compilers:Principles,Techniques&Tools[M].2nd ed.北京:机械工业出版社,2007.
[2]Andrew Appel,Maia Ginsburg.Modern Compiler Implementation in C[M].北京:人民邮电出版社,2005.
基本信息:
DOI:10.16512/j.cnki.jsjjy.2010.03.019
中图分类号:TP314-4
引用信息:
[1]王强,冯雁.编译原理算法的形象教学[J].计算机教育,2010,No.111(03):30-32.DOI:10.16512/j.cnki.jsjjy.2010.03.019.
2010-02-10
2010-02-10
