Skip to content
Preprint

MSLL: A Runtime Multi-Stack Parsing Approach for Interactive Grammar Development - A Lightweight Extension of LL-Style Recursive Descent

Aug 2026 · 0 citations · 32 references
Computer Science

TL;DR

MSLL is presented, a lightweight runtime extension of recursive-descent LL parsing for edit-time grammar exploration that is a development-time companion to existing LL-based parser generators rather than a replacement for production parsers.

Abstract

Few grammars are designed in a straight line. During grammar prototyping, authors often want to run a partially settled rule before refactoring overlapping alternatives or regenerating parser code. Predictive parsers are effective for stable grammars, but their generation and compilation loop can slow down interactive grammar development. This paper presents MSLL, a lightweight runtime extension of recursive-descent LL parsing for edit-time grammar exploration. When a FIRST/FIRST conflict appears, MSLL keeps multiple live parsing stacks, lets each stack follow a different candidate production, and prunes a stack as soon as the input contradicts it. Ambiguity is therefore handled as a runtime state-management problem rather than as a condition that must be removed before execution. The prototype targets an ANTLR-style grammar workflow: run and inspect an evolving grammar directly, collect conflict traces, and later translate or adapt the stabilized grammar for a generated parser. Experiments on DSL-style workloads show that MSLL finishes three 1k-token benchmarks in 48, 49, and 59 ms; stays under one second on two ambiguous 50k-token workloads; and reaches 5.395 s on a 500k-token deeply nested stress case. A real-world JSON grammar case confirms interactive behavior on small and medium inputs while exposing prototype-level super-linear overhead at 500k tokens. The results position MSLL as a development-time companion to existing LL-based parser generators rather than a replacement for production parsers.

View source

Similar papers

Preprint Sep 2026

Where the LLM Ends and Reliable Decisions Begin

The ANVIL compiler architecture is proposed, where ANVIL performs exceptionally well on leading benchmarks by using language models purely where they are effective, rather than as a catch-all tool.

Priyadarshan Patil, A. Basu, Vikas Reddy et al. · 0 citations
Book Open access Oct 2026

SwiftGram: Dynamic Lexical Forking for Precise and Efficient Grammar-Constrained Decoding

Large Language Models (LLMs) must strictly adhere to grammatical constraints for reliable structured generation in agentic workflows, code synthesis, and domain-specific language (DSL) generation. Grammar-Constrained Decoding (GCD) enforces this by masking out tokens incompatible with the target grammar at each decodin...

Shu-Yi Ling, Liang-Yi Kang, Jie Liu et al. · 0 citations
Book Open access Oct 2026

Fastbelt: An Architecture for Efficient Language Engineering

Language workbenches such as Xtext and Langium have made it substantially easier to build IDE tooling for domain-specific languages. However, as workspaces grow, build times and memory consumption of these frameworks exceed acceptable levels, negatively impacting user experience. In this paper, we present Fastbelt, a n...

Mark Sujew, Steven Smyth · 0 citations
Open access Oct 2026

Programming with Composable Recursive Patterns and Transformations

Data processing using traditional pattern matching syntax and direct recursive functions is straightforward to write but becomes awkward in ambiguous (i.e., nondeterministic) cases: when programmers wish to avoid backtracking, they often end up having to write complicated code that sacrifices clarity and modularity. Ho...

Lu-Yu Cheng, Florent Ferrari, Michael D. Adams et al. · 0 citations
#artificial intelligence Preprint Sep 2026

Dynamic Adaptation of the LLM Context for Generating Routines with Coupled Semantics

LLM-based code generation fails when correctness depends on execution-dependent coupling: the meaning of one routine is defined by the runtime behavior of another, a relationship that cannot be resolved from textual descriptions alone. This limitation, which we call static binding, is not confined to explicitly coupled...

Gnaneswar Villuri, Hashmath Shaik, Alex Doboli · 1 citation

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.