Compiler Design Using Template “Meta-Programming”
Document Type
Project
Advisors
Dr. Christian Trefftz, trefftzc@gvsu.edu
Embargo Period
8-16-2010
Abstract
Compiler design is a well researched area of computer science. Typically, compiler designers use a parser generator framework like YACC or PCCTS to construct lexer, scanner, parser, and abstract syntax tree. With the arrival of expression templates and template meta-programming, it is possible to construct a parser by simply using the template meta-programming technique. The Spirit library is an object-oriented recursive-decent parser implemented in C++ using expression templates and meta-programming. In Spirit the parser is constructed at compile time using a combination of primitive parsers and fusing them through template meta-programming. TinyPascal is a practical application of the Spirit framework.
ScholarWorks Citation
Gerzic, Amer, "Compiler Design Using Template “Meta-Programming”" (2007). Technical Library. 19.
https://scholarworks.gvsu.edu/cistechlib/19