Efficient incremental LR parsing for syntax-directed editors

  • Authors:
  • Pierpaolo Degano;Stefano Mannucci;Bruno Mojana

  • Affiliations:
  • Dipartimento di Informatica, Università di Pisa, Corso Italia, 40, I-56100 Pisa, Italy;Dipartimento di Informatica, Università degli Studi di Pisa and TECSIEL, Via S. Maria 19, I-56100 Pisa, Italy;Dipartimento di Informatica, Università degli Studi di Pisa and TECSIEL, Via S. Maria 19, I-56100 Pisa, Italy

  • Venue:
  • ACM Transactions on Programming Languages and Systems (TOPLAS)
  • Year:
  • 1988

Quantified Score

Hi-index 0.00

Visualization

Abstract

A technique for generating parsers which is an extension to LR techniques and is based on parsing table splitting, is presented. Then this technique is slightly extended to support incremental syntax analysis. Given a context-free grammar and a set “IC” of nonterminals devised to be incremental, a set of subtables is generated to drive the analysis of program fragments derivable from nonterminals in IC.The proposed technique generates parsing tables which are considerably smaller than the standard ones, even when incrementality is not exploited. Thus, these tables may be stored as arrays permitting faster access and accurate error handling. Furthermore, our tables are suitable for generating syntax-directed editors which provide a full analytic mode. The efficiency of the analytic component of a syntax-directed editor obtained in this way and its easy integration with the generative component stress the advantages of incremental program writing.