Skip to Content
Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design
book

Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design

by Dmitri Nesteruk
November 2021
Beginner to intermediate
391 pages
5h 23m
English
Apress
Content preview from Design Patterns in Modern C++20: Reusable Approaches for Object-Oriented Software Design
© Dmitri Nesteruk 2022
D. NesterukDesign Patterns in Modern C++20https://doi.org/10.1007/978-1-4842-7295-4_15

15. Interpreter

Dmitri Nesteruk1  
(1)
St. Petersburg, Russia
 

The goal of the Interpreter design pattern is, as you may have guessed, to interpret input, particularly textual input – although, to be fair, it really doesn’t matter. The notion of an Interpreter relates directly 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.

Here are a few fairly obvious ones:
  • Numeric literals such as 42 or 1.234e12 need ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns in Modern C++: Reusable Approaches for Object-Oriented Software Design

Design Patterns in Modern C++: Reusable Approaches for Object-Oriented Software Design

Dmitri Nesteruk

Publisher Resources

ISBN: 9781484272954Purchase LinkPublisher Website