摘要
本文探讨如何在"编译原理"教学过程中形象地演示复杂的算法过程,提出了一个演示算法步骤的方案,展示算法步骤的进行以及步骤进行时的数据联动,对于不同的动作、不同意义的数据,用图形元素和颜色加以区分,并以LR分析算法为例说明了如何分解复杂步骤,如何用图形和颜色展示移进、归约、接受、出错等分析动作以及相关数据的变化。
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.
出处
《计算机教育》
2010年第3期30-32,共3页
Computer Education
关键词
算法演示
形象教学
编译原理
LR算法分析
algorithm visualization
visualizing teaching
principles of compiler
LR Parsing