【24h】

The Design and Implementation of C-like Language Interpreter

机译:C-ligual Progresser的设计与实现

获取原文

摘要

This paper designs and implements a C-like language interpreter using C++ based on the idea of modularity. The whole system can be divided into three modules, namely, lexical analyzer, syntactic analyzer and evaluation of expression. During the design, token is being used. The design puts great emphasis towards code reusability and extensibility, which makes it easy to embed the code into other C++ programs. The final testing result shows that the implemented interpreter realizes almost all the interpretation functions of C-like language, including the interpretation of interface function call. It can also be used as script engine of games to control game logic through text, and games can be modified during running without recompiling the source code. Moreover, it has good portability. It can successfully run on different operating systems like Windows XP, MAC OS X 10.6.1, and iPhone OS 3.0.
机译:本文使用C ++基于模块化的思想来设计和实现C样语言解释器。整个系统可分为三个模块,即词汇分析仪,句法分析仪和表达式的评估。在设计期间,正在使用令牌。该设计非常重视代码可重用性和可扩展性,这使得将代码嵌入其他C ++程序方面很容易。最终的测试结果表明,实现的解释器实现了几乎所有类似于C的语言的解释功能,包括接口函数调用的解释。它也可以用作游戏的脚本引擎来通过文本控制游戏逻辑,并且可以在运行期间修改游戏而无需重新编译源代码。而且,它具有良好的便携性。它可以在Windows XP,Mac OS X 10.6.1和iPhone OS 3.0等不同操作系统上成功运行。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号