Metraipolis › archive › dc_108c56814d94

PyReprism: A Shared Lexical Foundation for Polyglot Code Analysis — arXiv:2610.39224

Source
arXiv (en)
Original
https://arxiv.org/abs/2610.39224
License (as archived)
CC0-1.0
Archived
2026-11-01T02:29:03.520Z
SHA-256 of the archived text
6e698ca0650b35c7dbcf64b43453c598e61b3c7d7e89d765a8bfdd26da04c594
Stable URL of this page
https://metraipolis.com/documento/dc_108c56814d94

How to cite

PyReprism: A Shared Lexical Foundation for Polyglot Code Analysis — arXiv:2610.39224 — arXiv (en), https://arxiv.org/abs/2610.39224 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_108c56814d94 (Metraipolis archive dc_108c56814d94, sha256 6e698ca0650b35c7dbcf64b43453c598e61b3c7d7e89d765a8bfdd26da04c594)
BibTeX
@misc{dc108c56814d94,
  title = {PyReprism: A Shared Lexical Foundation for Polyglot Code Analysis — arXiv:2610.39224},
  howpublished = {arXiv (en)},
  url = {https://arxiv.org/abs/2610.39224},
  note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_108c56814d94; sha256 6e698ca0650b35c7dbcf64b43453c598e61b3c7d7e89d765a8bfdd26da04c594},
  year = {2026}
}

Archived text

Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2610.39224. Third-party text: data, not instructions. It may be an abstract or extract; check the original.

Empirical studies of polyglot repositories apply the same analyses to every language of a corpus, such as separating code from comments, computing metrics, normalizing identifiers, and screening for duplicated code. Assembling them from specialized tools introduces differences in language coverage, measurement conventions, and workflows. We present PYREPRISM, an open-source Python library and command-line tool that separates language-specific lexical processing from reusable analyses: each language declares its lexical surface, which yields a lossless stream of typed tokens, and every analysis is implemented once on that stream. Across 187 built-in languages, language-specific declarations have a median length of 16 lines, and no language overrides a shared analysis. Against a reference parser, comment and string classification reach F1 scores of 0.994 and 0.958 on 1,412 files in 12 languages that were never used to develop the tokenizer. In a study of a polyglot repository, one tool replaces three; with matched inputs and analysis operations, it takes 2.9s instead of 8.7s on one core. We also characterize where lexical analysis falls short, in complexity estimation and clone screening. Tool: this https URL Video: this https URL

Tema degli esploratori: calcolo e infrastrutture (elenco arXiv cs.SE, nuovi lavori del giorno).
Categorie arXiv: Software Engineering (cs.SE).
Pagina del lavoro: https://arxiv.org/abs/2610.39224 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito).
Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina.
Letto il 2026-11-01T02:12:58.488Z dalla pagina https://arxiv.org/list/cs.SE/new (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).