Natural and Flexible Error Recovery for Generated Modular Language Environments

October 10, 2012

In 2008, error recovery for generalized (scannerless) LR parsing appeared to be an unsolvable problem. Now, users of Spoofax get an error recovering parser for free, based on the SDF syntax definition of a language. The integration of our earlier OOPSLA 2009 and SLE 2009 papers into a journal article has now been accepted for publication in ACM TOPLAS. (It may take a while before the paper is actually published; we’ll provide a pre-print as soon as possible.)

Maartje de Jonge, Lennart C. L. Kats, Emma Soderberg, Eelco Visser. Natural and Flexible Error Recovery for Generated Modular Language Environments. ACM Transactions on Programming Languages and Systems, 2013 (to appear).

Abstract: Integrated development environments (IDEs) increase programmer productivity, providing rapid, interactive feedback based on the syntax and semantics of a language. Unlike conventional parsing algorithms, scannerless generalized-LR parsing supports the full set of context-free grammars, which is closed under composition, and hence can parse languages composed from separate grammar modules. To apply this algorithm in an interactive environment, this paper introduces a novel error recovery mechanism. Our approach is language-independent, and relies on automatic derivation of recovery rules from grammars. By taking layout information into consideration it can efficiently suggest natural recovery suggestions.

Update: The publication process went faster than expected and the article was published in December 2012.