Parsing Transformative LR(1) Languages
Blake Hegerle

TL;DR
This paper introduces a novel LR(1) parsing algorithm that allows grammars to be modified during parsing, ensuring correctness and termination, thereby enabling more flexible and powerful programming languages.
Contribution
It develops a halting, correct parsing algorithm that supports grammar modifications during parsing, advancing the foundation for transformative programming languages.
Findings
Developed a test to ensure parser halts during grammar modifications.
Proved the correctness of the modified LR(1) parsing algorithm.
Compared the new approach with previous methods, highlighting improvements.
Abstract
We consider, as a means of making programming languages more flexible and powerful, a parsing algorithm in which the parser may freely modify the grammar while parsing. We are particularly interested in a modification of the canonical LR(1) parsing algorithm in which, after the reduction of certain productions, we examine the source sentence seen so far to determine the grammar to use to continue parsing. A naive modification of the canonical LR(1) parsing algorithm along these lines cannot be guaranteed to halt; as a result, we develop a test which examines the grammar as it changes, stopping the parse if the grammar changes in a way that would invalidate earlier assumptions made by the parser. With this test in hand, we can develop our parsing algorithm and prove that it is correct. That being done, we turn to earlier, related work; the idea of programming languages which can be…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Formal Methods in Verification · Logic, programming, and type systems
