[1]钟志超,张志胜,戴敏,等.流程图与类C语言实时转换方法[J].东南大学学报(自然科学版),2009,39(3):502-507.[doi:10.3969/j.issn.1001-0505.2009.03.016]
 Zhong Zhichao,Zhang Zhisheng,Dai Min,et al.Real-time conversion method for flowchart and similar C language[J].Journal of Southeast University (Natural Science Edition),2009,39(3):502-507.[doi:10.3969/j.issn.1001-0505.2009.03.016]
点击复制

流程图与类C语言实时转换方法()
分享到:

《东南大学学报(自然科学版)》[ISSN:1001-0505/CN:32-1178/N]

卷:
39
期数:
2009年第3期
页码:
502-507
栏目:
计算机科学与工程
出版日期:
2009-05-20

文章信息/Info

Title:
Real-time conversion method for flowchart and similar C language
作者:
钟志超 张志胜 戴敏 曹杰 史金飞
东南大学机械工程学院, 南京 211189
Author(s):
Zhong Zhichao Zhang Zhisheng Dai Min Cao Jie Shi Jinfei
School of Mechanical Engineering,Southeast University,Nanjing 211189,China
关键词:
流程图 类C语言 XML 实时转换
Keywords:
flowchart similar C language eXtensible markup language real-time conversion
分类号:
TP311
DOI:
10.3969/j.issn.1001-0505.2009.03.016
摘要:
为了融合图形化和文本语言2种编程方式的优点,提高教育机器人编程平台的直观性和通用性,结合编程平台要求,设计出流程图与类C语言双向实时转换方法.在进行流程图到类C语言转换时,实时根据各个模块间的父子关系遍历模块树,并根据功能模块封装的库函数和语句完成转换,在转换过程中实时进行类C语言规则检查.在进行类C语言到流程图转换时,首先通过词法分析、语法分析和语义分析生成XML代码,再进行统一解析生成流程图.在转换过程中实时进行错误检查,出现错误所在行会高亮显示以提示用户,并给出错误原因以便于用户修改程序.最后,通过典型结构转换实例和应用,验证了所提出方法的有效性和正确性.
Abstract:
A new real-time conversion method for a flowchart and a similar C language is proposed to realize the versatility of a programming platform of educational robots by the integration of graphics and text programming. During the process of converting the flowchart to a similar C language, the module tree is scanned according to the relationships between modules; moreover, the converting results are achieved and checked by the library function and the rule of the similar C language. During the process of converting the similar C language to the flowchart, an XML(eXtensible markup language)code is generated by lexical analysis, syntax analysis and semantic analysis; then, a flowchart is built via an XML parser. Besides, real-time error checks are carried out to highlight the error line and prompt the user of the wrong reason. Finally, an example of the conversion of a typical structure is given to illustrate the validity and efficiency of the method.

参考文献/References:

[1] 邱长伍,曹其新.机器人图形化编程与三维仿真环境[J].机器人,2005,27(5):436-440.
  Qiu Changwu,Cao Qixin.Graphical programming and 3D simulation environment for robot[J].ROBOT,2005,27(5):436-440.(in Chinese)
[2] Cox P T,Smedley T J.Building environment for visual programming of robots by demonstration[J].Journal of Visual Language and Computing,2000,11(5):549-571.
[3] Cox P T,Smedley T J.Using visual programming to extend the power of spreadsheet computation [C] //Proceedings of the Workshop on Advanced Visual Interfaces.New York,USA:ACM,1994:153-161.
[4] 鲍贤捷,陈卫东,曹其新.机器人图标化编程环境的设计与实现[J].机器人,2006,28(6):617-622.
  Bao Xianjie,Chen Weidong,Cao Qixin.An icon-based robot programming environment:design and implementation[J].ROBOT,2006,28(6):617-622.(in Chinese)
[5] Bischoff R,Kazi A,Seyfarth M.The MORPHA style guide for icon-based programming [C] //Proceedings of the IEEE International Workshop on Robot and Human Interactive Communication.New York,USA:IEEE,2002:482-487.
[6] 吴洁,何花,周波.浅谈教育机器人[J].教学研究,2006(7):14-17.
  Wu Jie,He Hua,Zhou Bo.About instructional robots [J].Teaching Study,2006(7):14-17.(in Chinese)
[7] 王韦韦,孙庆鸿.基于XML的分布异构数据集成平台[J].东南大学学报:自然科学版,2006,36(5):715-719.
  Wang Weiwei,Sun Qinghong.Intergrated platform of distributed heterogeneous data based on XML [J].Journal of Southeast University:Natural Science Edition,2006,36(5):715-719.(in Chinese)
[8] 章明,许青松,沈锡臣.基于XML的数据交换共享平台模型[J].清华大学学报:自然科学版,2003,43(1):105-107.
  Zhang Ming,Xu Qingsong,Shen Xichen.Data exchange and sharing platform model based on XML[J].Journal of Tsinghua University:Science and Technology,2003,43(1):105-107.(in Chinese)
[9] 张银鹤,张秋香,孙膺,等.XML实践教程[M].北京:清华大学出版社,2007:28-33.
[10] 金成植,金英.编译程序设计原理[M].北京:高等教育出版社,2007.

备注/Memo

备注/Memo:
作者简介: 钟志超(1984—),男,硕士生; 张志胜(联系人),男,博士,教授,博士生导师,oldbc@seu.edu.cn.
基金项目: 国家自然科学基金资助项目(50805023).
引文格式: 钟志超,张志胜,戴敏,等.流程图与类C语言实时转换方法[J].东南大学学报:自然科学版,2009,39(3):502-507. [doi:10.3969/j.issn.1001-0505.2009.03.016]
更新日期/Last Update: 2009-05-20