基于ANTLR4的DDS代码生成工具的设计与实现  被引量:2

Design and implementation of DDS code generation tool based on ANTLR4

在线阅读下载全文

作  者:叶亚峰 寇金桥 邵宗林 YE Ya-feng;KOU Jin-qiao;SHAO Zong-lin(Institute 706,Second Academy of China Aerospace Science and Industry Corporation,Beijing 100854,China)

机构地区:[1]中国航天科工集团第二研究院七〇六所,北京100854

出  处:《计算机工程与设计》2023年第4期1274-1280,F0003,共8页Computer Engineering and Design

摘  要:当下DDS代码生成工具生成的工程文件冗余、开源代码不能满足项目需要,为此设计并实现基于ANTLR4的DDS代码生成工具,根据IDL文件中定义的数据类型,生成支持CMake构建的工程文件,能够在Windows/Linux等不同平台下的编译。聚焦于识别和处理IDL编程语言的词法、语法及语义分析,基于ANTLR4语言识别工具和实例化模板,构建用户自定义数据结构的DDS应用代码文件。测试结果表明,所提工具支持UI和命令行两种运行方式,具有较好的生成速度,支持IDL标准中定义的多种数据类型和关键字,生成的工程文件支持跨平台编译。In view of the current situation that the project files generated by DDS code generation tools are redundant and open source code cannot meet the needs of the project,a DDS code generation tool based on ANTLR4 was designed and implemented,which generated project files supporting CMake construction according to the data types defined in IDL files,and it was conve-nient to transplant and support compilation under different platforms such as Windows/Linux.Focusing on identifying and processing the lexical,grammatical and semantic analysis of IDL programming language,based on ANTLR4 language identification tool and instantiation template,DDS application code files with user-defined data structures were constructed.Testing results demonstrate that the proposed tool has two operation modes including UI and command line with better generation speed,it supports a variety of data types and keywords defined in IDL standards,and the project files generated using the tool can be compiled in different platforms.

关 键 词:数据分发服务 接口描述语言 语言识别工具 语法分析 词法分析 语义分析 代码生成工具 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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