Semantics-Preserving Transformation of Context-Free Grammars into LL(1) Form

Transformation of context-free grammars into LL(1) form enables construction of simple and efficient parsers. However, if semantics are overlooked, the transformation is likely to result in a complex grammar that needs to be manually aligned with the original semantics. This work presents a method of semantics-preserving grammar transformation into LL(1) form using a representation based on trees. Grammar rules and their semantics are modelled as typed tree nodes, which enables elimination of LL(1) conflicts while retaining the original semantics. Transformed grammars can be used to construct continuation-passing style parsers that produce parse trees matching the original grammar. It is shown how this approach can be applied to the design of domain-specific languages in Java, resulting in size and type complexity linear in the size of the transformed grammar.

Authors

Publication Details

Published
2025-10-09
DOI
https://doi.org/10.1145/3759429.3762618
Primary Topic
Natural Language Processing Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Semantics-Preserving Transformation of Context-Free Grammars into LL(1) Form

Vladyslav Bilyk
Natural Language Processing Techniques
article

Semantics-Preserving Transformation of Context-Free Grammars into LL(1) Form

Vladyslav Bilyk
article en

Abstract

Transformation of context-free grammars into LL(1) form enables construction of simple and efficient parsers. However, if semantics are overlooked, the transformation is likely to result in a complex grammar that needs to be manually aligned with the original semantics. This work presents a method of semantics-preserving grammar transformation into LL(1) form using a representation based on trees. Grammar rules and their semantics are modelled as typed tree nodes, which enables elimination of LL(1) conflicts while retaining the original semantics. Transformed grammars can be used to construct continuation-passing style parsers that produce parse trees matching the original grammar. It is shown how this approach can be applied to the design of domain-specific languages in Java, resulting in size and type complexity linear in the size of the transformed grammar.

Openalex Percentile: Top 85%
Natural Language Processing 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.