LR parsing for strings with placeholders

• Investigation of parsing methods for strings containing placeholders can be formulated as the preservation of grammar classes. • Strings containing placeholders can be parsed by the standard LR(k) ( k ≥ 1) parser if the grammar for the language without placeholders is LR(k) and each nonterminal derives at least one nonempty string. • The property mentioned above does not holds for LR(0). This paper studies a parsing method for strings containing placeholders, each of which may be later replaced by a string derived from the corresponding nonterminal symbol. Such a method potentially applies to parallel/distributed parsing, parsing for templates, modular syntax definitions, and so on. This paper investigates whether the introduction of the placeholder preserves the class of the grammar and proves the following two facts. First, the class of LR( k )grammars is preserved if k ≥ 1 and every nonterminal derives at least one nonempty string; hence, we can apply the standard LR parsing algorithm for parsing strings with placeholders. Second, the class of LR(0) is not. These results extend the preceding study for the LL(1) grammars.

Authors

Institutions

Publication Details

Journal
Information Processing Letters
Published
2026-02-19
DOI
https://doi.org/10.1016/j.ipl.2026.106627
Primary Topic
DNA and Biological Computing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

LR parsing for strings with placeholders

Akimasa Morihata, Tomoki Nakamaru, Kohei Nakamichi
Information Processing Letters
DNA and Biological Computing
article

LR parsing for strings with placeholders

Akimasa Morihata, Tomoki Nakamaru, Kohei Nakamichi
article en

Abstract

• Investigation of parsing methods for strings containing placeholders can be formulated as the preservation of grammar classes. • Strings containing placeholders can be parsed by the standard LR(k) ( k ≥ 1) parser if the grammar for the language without placeholders is LR(k) and each nonterminal derives at least one nonempty string. • The property mentioned above does not holds for LR(0). This paper studies a parsing method for strings containing placeholders, each of which may be later replaced by a string derived from the corresponding nonterminal symbol. Such a method potentially applies to parallel/distributed parsing, parsing for templates, modular syntax definitions, and so on. This paper investigates whether the introduction of the placeholder preserves the class of the grammar and proves the following two facts. First, the class of LR( k )grammars is preserved if k ≥ 1 and every nonterminal derives at least one nonempty string; hence, we can apply the standard LR parsing algorithm for parsing strings with placeholders. Second, the class of LR(0) is not. These results extend the preceding study for the LL(1) grammars.

Information Processing LettersVol. 193
The University of Tokyo (JP)
Quality Education
Openalex Percentile: Top 51%
DNA and Biological Computing
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.