arXiv:2505.18778cs.CL2025-05

提出通用编辑器演算,可自动构造任意语言的无语法错误编辑器。

A generalised editor calculus (Short Paper)

  • 基于抽象语法生成专用编辑器,支持不完整程序
  • 保证语法正确性,且可处理未完成代码
  • 编码为带模式匹配的简单类型λ演算,便于实现

本文提出一种语法导向编辑器演算的泛化形式,可基于任意语言的抽象语法,实例化出对应的专用语法导向编辑器。该编辑器演算在允许不完整程序的同时,确保不会产生语法错误。随后,该泛化编辑器演算被编码为扩展了元组、布尔值、模式匹配和递归点的简单类型λ演算,从而具备形式化实现的基础。

原文摘要 · Abstract (English)

In this paper, we present a generalization of a syntax-directed editor calculus, which can be used to instantiate a specialized syntax-directed editor for any language, given by some abstract syntax. The editor calculus guarantees the absence of syntactical errors while allowing incomplete programs. The generalized editor calculus is then encoded into a simply typed lambda calculus, extended with pairs, booleans, pattern matching and fixed points

编辑器语法形式化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。