Abstract
The goal of the Interpreter design pattern is, you guessed it, to interpret input, particularly textual input, although to be fair it really doesn’t matter. The notion of an Interpreter is greatly linked to Compiler Theory and similar courses taught at universities. Since we don’t have nearly enough space here to delve into the complexities of different types of parsers and whatnot, the purpose of this chapter is to simply show some examples of the kinds of things you might want to interpret.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Tlön is a toy language that I built to demo the idea of “if you don’t like existing languages, build a new one.” It uses Boost.Spirit and cross-compiles (transpiles) into C++. It is open-source and can be found at https://github.com/nesteruk/tlon
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2018 Dmitri Nesteruk
About this chapter
Cite this chapter
Nesteruk, D. (2018). Interpreter. In: Design Patterns in Modern C++. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3603-1_15
Download citation
DOI: https://doi.org/10.1007/978-1-4842-3603-1_15
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3602-4
Online ISBN: 978-1-4842-3603-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books