计算机科学 > 程序设计语言
[提交于 2020年6月8日]
标题:SMIE: Weakness is Power!: Auto-indentation with incomplete information
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Automatic indentation of source code is fundamentally a simple matter of parsing the code and then applying language- and style-specific rules about relative indentation of the various constructs. Yet, in practice, full parsing is not always an option, either because of quirks of the language, or because the code is temporarily syntactically incorrect, or because of an incomplete or broken grammar. I present the design of Emacs's Simple-Minded Indentation Engine (SMIE), which gets its power from the weakness of the underlying parsing technique. It makes it possible to perform local parsing, which is hence unaffected by irrelevant surrounding code. This provides a form of graceful degradation in the face of incomplete, erroneous, or just plain problematic information.
提交历史
来自:Stefan Monnier[v1] 2020年6月8日 星期一 00:00:00 UTC