Generating the analytic component parts of syntax-directed editors with efficient-error recovery

U. Bianchi, Pierpaolo Degano, Stefano Mannucci, Simone Martini, Bruno Mojana, Corrado Priami, E. Salvatori. Generating the analytic component parts of syntax-directed editors with efficient-error recovery. Journal of Systems and Software, 23(1):65-79, 1993. [doi]

Abstract

The incremental jump-shift-reduce (I_JSR) technique is an extension of LR techniques based on parsing table splitting suitable for generating analytic components of syntax-directed editors. I_JSR parsers provide a full analytic mode. Moreover, since the parsing table is split into smaller subtables, these may be stored as arrays, thus permitting faster access and accurate error handling. Users can interactively modify the input in any place without artful auxiliary data structures, and there is no need to maintain the parse tree throughout the translation process. This technique is used in developing integrated front-ends. A set of subtables is generated and is used by a single driver routine, which performs, in a fully incremental way, both lexical and syntactical analyses and exhibits high-quality error handling. The language lexicon is defined through a set of regular grammars that generate a collection of sets of I_JSR items. The construction of the set of states for the parser is more standard. We used the classic YACC parser generator, extended by a new package supporting incrementality. A further enhancement to these components is the integrated support for error detection and recovery. A new, automatically generated, possibly interactive method for error handling is presented. Its main features are high-quality corrections, its flexibility, and easy integration with the above-sketched components of the editor.