软件体系结构第三章-解释器风格
解释器是程序,能够读入程序并直接输出结果,如下图
简易解释器只完成信息识别和转换,复杂解释器可以完成从词法到句法到语法的复杂识别和管理
基本构件:
–An interpretation engine to do the work (解释器引擎)
–A memory that contains (存储区):
•The pseudo-code to be interpreted (被解释的源代码)
•A representation of the control state of the interpretation engine (解释器引擎当前的内部控制状态的表示:在某个时刻需要执行哪些指令)
•A representation of the current state of the program being simulated. (程序当前执行状态的表示)
另外,如果对解释器想进一步了解的话,我强烈推荐这篇文章http://www.cnblogs.com/figure9/p/3620079.html