Reference. Syntactic Completions with Material Obligations
Code editors provide essential services that help developers understand, navigate, and modify programs. However, these services often fail in the presence of syntax errors. Existing syntax error recovery techniques, like panic mode and multi-option repairs, are either too coarse, e.g. in deleting large swathes of code, or lead to a proliferation of possible completions. This paper introduces tall tylr , an error-handling parser and editor generator that completes malformed code with syntactic obligations that abstract over many possible completions. These obligations generalize the familiar notion of holes in structure editors to cover missing operands, operators, delimiters, and sort transitions. tall tylr is backed by a novel theory of tile-based parsing, conceptually organized around a molder that turns tokens into tiles and a melder that completes and parses tiles into terms using an error-handling generalization of operator-precedence parsing. We formalize melding as a parsing calculus, meldr, that completes input tiles with additional obligations such that it can be parsed into a well-formed term, with success guaranteed over all inputs. We further describe how tall tylr implements molding and completionranking using the principle of minimizing obligations . Obligations offer a useful way to scaffold internal program representations, but in tall tylr we go further to investigate the potential of materializing these obligations visually to the programmer. We conduct a user study to evaluate the extent to which an editor like tall tylr that materializes syntactic obligations might be usable and useful, finding both points of positivity and interesting new avenues for future work.
Cite
Cites 28 works (2 here)
With notes (2)
Gradual Structure Editing with Obligations moon-2023-gradual
Hazelnut: a bidirectionally typed structure editor calculus omar-2017-hazelnut
External (26)
- Code Style Sheets: CSS for Code (2025)
- tylr: a tiny tile-based structure editor (2022)
- Multi-purpose Syntax Definition with SDF3 (2020)
- Toward semantic foundations for program editors (2017)
- Parallel parsing made practical (2015)
- A longitudinal study of programmers' backtracking (2014)
- Parallel parsing of operator precedence grammars (2013)
- The spoofax language workbench: rules for declarative specification of languages and IDEs (2010)
- The Scratch Programming Language and Environment (2010)
- Parsing Mixfix Operators (2008)
- Parsing techniques: a practical guide (2nd edition) (2008)
- Compilers: Principles, Techniques, & Tools (2007)
- A framework and methodology for studying the causes of software errors in programming systems (2005)
- Precedences in Specifications and Implementations of Programming Languages (1991)
- Efficient LL(1) error correction and recovery using only insertions (1980)
- A Locally Least-Cost LR-Error Corrector (1979)
- An Extended Operator Precedence Parsing Algorithm (1976)
- Deterministic parsing of ambiguous grammars (1975)
- Practical syntactic error recovery (1975)
- Complete Operator Precedence (1975)
- A New Normal-Form Theorem for Context-Free Phrase Structure Grammars (1965)
- Syntactic Analysis and Operator Precedence (1963)
- 10.4230/lipics.ecoop.2020.6
- 10.5281/zenodo.17007910
- Syntax repair as idempotent tensor completion
- Using filters for the disambiguation of context-free grammars