The design of parsers for incremental language processors

  • Authors:
  • G. Lindstrom

  • Affiliations:
  • Departmenf cf Computer Science, University of pittsburgh, Pittsburgh, Pennsylvania

  • Venue:
  • STOC '70 Proceedings of the second annual ACM symposium on Theory of computing
  • Year:
  • 1970

Quantified Score

Hi-index 0.00

Visualization

Abstract

An incremental language processor is one that accepts as input a sequence of substrings of the source language and maps them independently onto fragments in some object code. The ordered sequence of these object code fragments are then either compiled, in which case we have an incremental compiler, or interpreted. In the first case the advantage resulting is that subsequent changes in the source program entail only reprocessing the source fragments affected and recompiling the updated collection of object code fragments. In an environment where small changes are made frequently to large programs, e.g. debugging, the curtailment of reprocessing is attractive. In the second case the object code fragments are the actual run-time program representation, and hence inter-fragment relations are transiently evaluated as needed in the process of execution, with no long-term preservation of these relationships beyond the scope of their immediate need in execution time. This permits the possibility of program recomposition in the midst of execution, one of the principal characteristics of conversational computing. Many conversational language processors execute a program representation functionally analogous to parse trees, i.e. the syntax analysis of a fragment, insofar as it is possible, is done at fragment load time. This representation choice is popular because many of the expensive aspects of interpretation, including character string scanning, symbol table lookup, and parsing, are performed once only and do not contribute to the execution overhead. This paper is devoted to examining the question of the construction of such a parser in a general manner for an arbitrary source language.