Incremental generation of lexical scanners

  • Authors:
  • J. Heering;P. Klint;J. Rekers

  • Affiliations:
  • CWI, Amsterdam, The Netherlands;CWI, Amsterdam, The Netherlands/ and Univ. of Amsterdam, Amsterdam, The Netherlands;CWI, Amsterdam, The Netherlands

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

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is common practice to specify textual patterns by means of a set of regular expressions and to transform this set into a finite automaton to be used for the scanning of input strings. In many applications, the cost of this preprocessing phase can be amortized over many uses of the constructed automaton. In this paper new techniques for lazy and incremental scanner generation are presented. The lazy technique postpones the construction of parts of the automaton until they are really needed during the scanning of input. The incremental technique allows modifications to the original set of regular expressions to be made and reuses major parts of the previous automaton. This is interesting in applications such as environments for the interactive development of language definitions in which modifications to the definition of lexical syntax and the uses of the generated scanners alternate frequently.