Abstract
Metaprogramming may be done with just a few programming techniques: an object-program representation (to capture the syntactical structure of object programs), pattern matching or accessors (to take apart object programs or to select suitable parts thereof), pattern building or constructors (to construct or compose object programs), and a computational model for tree walking (e.g., visitors in OO programming or possibly just recursion). In this chapter, we describe some metaprogramming techniques on the basis of which many metaprograms can be written in a more disciplined style. That is, we describe term rewriting, attribute grammars, multi-stage programming, partial evaluation, and abstract interpretation.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this chapter
Cite this chapter
Lämmel, R. (2018). A Suite of Metaprogramming Techniques. In: Software Languages. Springer, Cham. https://doi.org/10.1007/978-3-319-90800-7_12
Download citation
DOI: https://doi.org/10.1007/978-3-319-90800-7_12
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-90798-7
Online ISBN: 978-3-319-90800-7
eBook Packages: Computer ScienceComputer Science (R0)