摘 要: 针对程序流程图到代码自动翻译过程中,通常需要经过代码优化及二次编程,翻译效率不高,提出基于图
元装接模式的流程图到C语言源程序转换的解决方案,实现流程图到源程序的双向转换。由图元同步产生代码元,通过
装接自动生成程序代码。所生成的程序代码无需修改,可直接编译运行。通过词法分析,识别并产生代码元和对应图
元,可逆向生成流程图。其有效性在原型系统中得到了验证。 |
关键词: C语言;流程图;程序代码;自动翻译 |
中图分类号: TP311.5
文献标识码: A
|
基金项目: 江苏现代教育研究立项课题 |
|
Automatic Translation from Flowchart to Program CodeBase on Graphics Primitive Assembling |
XU Xiulin,LI Yunhua1,2
|
1.( 1.Department of Electronic Information Engineering, NanTong Vocation University, Nantong 226007, China;2. 2.Department of Electronic Information, NanTong University, Nantong 226007, China)
|
Abstract: The translation,from flowchart into program code automatically,usually requires code optimization and
quadratic programming,and works inefficiency.The solution is proposed for translation from flow chart to source program of
C language base on graphics primitive assembling.According the solution,the conversion is in both directions of flowchart
and the source program.The code primitive is created with graphics primitive synchronously.Then,the program code is
automatically generated while the code primitives are assembled together.It can be compiled and run directly.Instead,with the
identification and generate of code primitive through lexical analysis,a flowchart can be produced reverse from the source
program.Its effectiveness has been verified in the prototype system. |
Keywords: C language;flow charts;program code;automatic translation |