Development of Lightweight Parsers with Different Go Language Granularity

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.

Authors

Institutions

Publication Details

Journal
Automatic Documentation and Mathematical Linguistics
Published
2024-12-01
DOI
https://doi.org/10.3103/s0005105525700426
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Development of Lightweight Parsers with Different Go Language Granularity

D. S. Drozdov, Stanislav Mikhalkovich
Automatic Documentation and Mathematical Linguistics
Software Testing and Debugging Techniques
article

Development of Lightweight Parsers with Different Go Language Granularity

D. S. Drozdov, Stanislav Mikhalkovich
article en

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.

Automatic Documentation and Mathematical LinguisticsVol. 58(S6)
Southern Federal University (RU)
Quality Education
Openalex Percentile: Top 71%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Development of Lightweight Parsers with Different Go Language Granularity — D. S. Drozdov, Stanislav Mikhalkovich · Automatic Documentation and Mathematical Linguistics (2024) | TGRS Research Map | TGRS