Acta lnformatica10, 307-321 (1978) mrmlia 9 by Springer-Verlag 1978 Incremental LR Parsers* A. Celentano Istituto di Elettrotecnicaed Elettronica, Politecnicodi Milano, Milano,Italy Summary. The concept of incremental parsing is briefly introduced. An algorithm which augments an LR parser with the capability of reanalyzing a limited part of a modified program is illustrated. The algorithm operates on a sequence of configurations representing the parse of the old input and finds the smallest part of the sequence which must be recomputed to obtain the parse of the new input. The implementation is discussed: a suitable data structure and a version of the algorithm which operates upon it are introduced; finally the problem of realizing efficient incremental parsers is faced, showing a modification to the basic algorithm which enable the reanalysis to be performed in linear time. 1. Introduction A lot of attention is devoted today to the development of methods and techniques for supporting software production. The support available to the programmer ranges from simple basic tools (i.e. editors, possibly with syntax checking) up to more sophisticated development systems [5-7] which allow for incremental construction of programs (step by step, level by level), easy modifications of them, and the possibility of verifying their correctness by proving assertions about the algorithms they employ 15]. Common to the various approaches is the basic concept of an interactive environment in which the programmer is to operate: program construction and modification are two phases of a man-machine dialogue. In this view some problems can arise: the recompilation (or reparsing) of a modified program can be a time consuming operation: during the debugging phase limited changes are made to the program, and avoidance of a complete re-analysis of the text in favour of the re-analysis of the modified part alone enhances the performance of the system. * Work supported by C.N.R., Italy 0001-5903/78/0010/0375/$03.00