流程图与类C语言实时转换方法  被引量:8

Real-time conversion method for flowchart and similar C language

在线阅读下载全文

作  者:钟志超[1] 张志胜[1] 戴敏[1] 曹杰[1] 史金飞[1] 

机构地区:[1]东南大学机械工程学院,南京211189

出  处:《东南大学学报(自然科学版)》2009年第3期502-507,共6页Journal of Southeast University:Natural Science Edition

基  金:国家自然科学基金资助项目(50805023)

摘  要:为了融合图形化和文本语言2种编程方式的优点,提高教育机器人编程平台的直观性和通用性,结合编程平台要求,设计出流程图与类C语言双向实时转换方法.在进行流程图到类C语言转换时,实时根据各个模块间的父子关系遍历模块树,并根据功能模块封装的库函数和语句完成转换,在转换过程中实时进行类C语言规则检查.在进行类C语言到流程图转换时,首先通过词法分析、语法分析和语义分析生成XML代码,再进行统一解析生成流程图.在转换过程中实时进行错误检查,出现错误所在行会高亮显示以提示用户,并给出错误原因以便于用户修改程序.最后,通过典型结构转换实例和应用,验证了所提出方法的有效性和正确性.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.

关 键 词:流程图 类C语言 XML 实时转换 

分 类 号:TP311[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象