← BYTES
Design Patterns·Starter·Ref: 17.1.12
What does the Interpreter pattern represent?
Have a question about this video? Mention reference 17.1.12 when you contact us.
a.A pattern for compressing text files
b.A way to translate code between two completely different programming languages at compile time
c.A grammar/language's rules as a class hierarchy, with each class representing one rule, letting you build an object structure that can be 'interpreted' to evaluate sentences in that language
d.A pattern used exclusively for encrypting data
Interpreter models a simple grammar as a hierarchy of expression classes (e.g., one class for 'number', one for 'addition', one for 'variable'), where interpreting a sentence in that language means walking the resulting object tree and evaluating it -- most useful for small, simple, domain-specific languages.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES17112#DesignPatterns