Parsing with C++ classes

  • Authors:
  • Damian Conway

  • Affiliations:
  • Victorian Centre for Image Processing and Graphics, Department of Computer Science, Monash University, Clayton, Victoria 3168, Australia

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1994

Quantified Score

Hi-index 0.00

Visualization

Abstract

Philip W. Hall IV [1] has outlined a preprocessor technique for building recursive descent parsers using C++ constructor functions. This paper presents an alternative C++-based parser generation scheme which uses a hierarchy of classes with appropriately overloaded operators to embed the actual grammar of one or more parsers in a standard C++ source file. This approach eliminates the need for preprocessing of source files and permits the use of parsing schemes somewhat more sophisticated than simple statically-defined recursive descent.