|国家预印本平台
首页|解析代码自动生成框架的设计与实现

解析代码自动生成框架的设计与实现

esign and implementation of an Automated Generate code framework

中文摘要英文摘要

对原始数据的正确解析是每个项目中首先进行的重要步骤,在实际开发中,因数据结构多样而解析原理相似,传统的手工编写代码会产生大量重复性劳动,既降低了开发效率,又容易造成编码错误、维护困难等问题。本文设计与开发了一种解析代码自动生成框架PAGF(Parsing code Automatically Generate Framework),在基于模板生成代码的原理下设计与组合了一系列功能模块。PAGF通过对一种基于自定义语言SDFL(Source Data Format Language)编写的描述文件的解析,可自动生成用于解析原始数据的可执行代码。PAGF具有强大的可拓展性,生成的代码可结合多种工具,应用于多种场景。PAGF还通过可视化的封装,使得用户可遵循引导,通过编写少量的数据描述文件自动生成数据解析代码,从而极大减少了工作量。经基于Hadoop环境下的应用案例验证,生成代码与人工编写的代码相比,应用效果无偏差、性能稳定。

Parsing original data correctly is the first important step in each project. In the actual project, the diversify data structures and the similarity of analytic methods make the traditional manual coding produces a lot of repetitive work, which reduces the development efficiency as well as causing errors, maintenance difficulties and other issues. This paper designs and develops a PAGF (Parsing code Automatically Generated Framework), which designs and combines a series of functional modules based on templates to generate code for data parsing. PAGF automatically generates executable code for data parsing by parsing a description file written in a custom language called SDFL (Source Data Format Language). PAGF has a strong scalability, the code can be combined with a variety of tools, applied to a variety of scenarios. PAGF also allows users to follow the guidance through visual encapsulation, the users can get the code for data parsing automatically by writing a small amount of data description file.Verified by a real case based on Hadoop, the generated code has the same performance with the manual code.?????

雷友珣、周卓茹、崔毅东

计算技术、计算机技术

代码自动生成数据解析描述语言模板

generate code automaticallydata parsingformat Languagetemplate

雷友珣,周卓茹,崔毅东.解析代码自动生成框架的设计与实现[EB/OL].(2016-11-08)[2025-07-23].http://www.paper.edu.cn/releasepaper/content/201611-106.点此复制

评论