Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
ACM SIGPLAN Notices
Parsing with C++ deferred expressions
ACM SIGPLAN Notices
Hi-index | 0.00 |
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.