RE2C: a more versatile scanner generator

  • Authors:
  • Peter Bumbulis;Donald D. Cowan

  • Affiliations:
  • Univ. of Waterloo, Waterloo, Ont., Canada;Univ. of Waterloo, Waterloo, Ont., Canada

  • Venue:
  • ACM Letters on Programming Languages and Systems (LOPLAS)
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

Abstract

It is usually claimed that lexical analysis routines are still coded by hand, despite the widespread availability of scanner generators, for efficiency reasons. While efficiency is a consideration, there exist freely available scanner generators such as GLA [Gray 1988] that can generate scanners that are faster than most hand-coded ones. However, most generated scanners are tailored for a particular environment, and retargeting these scanners to other environments, if possible, is usually complex enough to make a hand-coded scanner more appealing. In this paper we describe RE2C, a scanner generator that not only generates scanners that are faster (and usually smaller) than those produced by any other scanner generator known to the authors, including GLA, but that also adapt easily to any environment.