Development of Lightweight Parsers with Different Go Language Granularity

IF 0.5 Q4 COMPUTER SCIENCE, INFORMATION SYSTEMS
D. S. Drozdov, S. S. Mikhalkovich
{"title":"Development of Lightweight Parsers with Different Go Language Granularity","authors":"D. S. Drozdov,&nbsp;S. S. Mikhalkovich","doi":"10.3103/S0005105525700426","DOIUrl":null,"url":null,"abstract":"<p>This article considers an approach to creating a family of lightweight grammars for the Go language, with a special symbol Any denoting the skipped part of the program [1]. A formal definition of a more granular grammar is given, along with examples illustrating the increase in grammar rule granularity. The efficiency of the constructed lightweight parsers is analyzed in terms of memory usage and runtime on seven industrial repositories. It is shown that increasing the granularity of the grammar does not lead to a significant increase in parser resource consumption and varies only slightly depending on repository type and coding style in Go. Furthermore, the advantages of using lightweight grammars with Any over full grammars are summarized. An example of using a lightweight grammar to determine code complexity is presented. The results can also be applied to estimate the parser’s contribution to overall resource consumption, e.g., in tasks such as code binding and project markup.</p>","PeriodicalId":42995,"journal":{"name":"AUTOMATIC DOCUMENTATION AND MATHEMATICAL LINGUISTICS","volume":"58 6 supplement","pages":"S333 - S342"},"PeriodicalIF":0.5000,"publicationDate":"2025-04-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"AUTOMATIC DOCUMENTATION AND MATHEMATICAL LINGUISTICS","FirstCategoryId":"1085","ListUrlMain":"https://link.springer.com/article/10.3103/S0005105525700426","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q4","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0

Abstract

This article considers an approach to creating a family of lightweight grammars for the Go language, with a special symbol Any denoting the skipped part of the program [1]. A formal definition of a more granular grammar is given, along with examples illustrating the increase in grammar rule granularity. The efficiency of the constructed lightweight parsers is analyzed in terms of memory usage and runtime on seven industrial repositories. It is shown that increasing the granularity of the grammar does not lead to a significant increase in parser resource consumption and varies only slightly depending on repository type and coding style in Go. Furthermore, the advantages of using lightweight grammars with Any over full grammars are summarized. An example of using a lightweight grammar to determine code complexity is presented. The results can also be applied to estimate the parser’s contribution to overall resource consumption, e.g., in tasks such as code binding and project markup.

不同Go语言粒度的轻量级解析器的开发
本文考虑了一种为Go语言创建一系列轻量级语法的方法,使用特殊符号Any表示程序中被跳过的部分[1]。本文给出了更细粒度语法的正式定义,以及说明语法规则粒度增加的示例。根据七个工业存储库上的内存使用和运行时,分析了构建的轻量级解析器的效率。结果表明,增加语法的粒度不会导致解析器资源消耗的显著增加,并且仅根据Go中的存储库类型和编码风格略有不同。此外,还总结了使用轻量级语法与Any相比使用完整语法的优点。给出了一个使用轻量级语法来确定代码复杂度的示例。结果还可以用于估计解析器对总体资源消耗的贡献,例如,在代码绑定和项目标记等任务中。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
AUTOMATIC DOCUMENTATION AND MATHEMATICAL LINGUISTICS
AUTOMATIC DOCUMENTATION AND MATHEMATICAL LINGUISTICS COMPUTER SCIENCE, INFORMATION SYSTEMS-
自引率
40.00%
发文量
18
期刊介绍: Automatic Documentation and Mathematical Linguistics  is an international peer reviewed journal that covers all aspects of automation of information processes and systems, as well as algorithms and methods for automatic language analysis. Emphasis is on the practical applications of new technologies and techniques for information analysis and processing.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信