| |||||||||
A compiler-compiler or parser generator is a utility for generating the source code of a parser, interpreter or compiler from an annotated language description in the form of a grammar (usually in BNF) plus code that is associated with each of the rules of the grammar that should be executed when these rules are applied by the parser. These pieces of code are sometimes referred to as semantic action routines since they define the semantics of the syntactic structure that is analysed by the parser. Depending upon the type of parser that should be generated, these routines may construct a parse tree or generate executable code directly.
The first compiler-compiler to be called a Compiler Compiler was written by Tony Booker in 1960 and was used to create compilers for the Ferranti Atlas computer at the University of Manchester. However it was rather different from modern compiler compilers, and today would probably be described as a highly customisable generic compiler rather than as a compiler generator. Other examples of compiler compilers are Coco/R, GNU bison, Eli, FSL, META 5, MUG2, Parsley, Pre-cc, Yacc, SableCC, JavaCC and MixedCC.
This article was originally based on material from the Free On-line Dictionary of Computing and is used under the GFDL.