Incremental generation of lexical scanners
- 1 October 1992
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 14 (4) , 490-520
- https://doi.org/10.1145/133233.133240
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.Keywords
This publication has 4 references indexed in Scilit:
- Lazy and incremental program generationACM Transactions on Programming Languages and Systems, 1994
- The syntax definition formalism SDF—reference manual—ACM SIGPLAN Notices, 1989
- The cost of lexical analysisSoftware: Practice and Experience, 1986
- Pattern Matching in TreesJournal of the ACM, 1982