So let's try to summarize what we've learned about the interpreter Design Patterns so excluding any
kind of simple case.
Typically what the interpreter does is it goes through its thing into stages and the first they just
called lexing that's when you take an expression and you basically turn it into a sequence of tokens
a sequence of primitives which are all self-contained and all defined just a an individual chunk of
the overall input because remember you can't just split it into individual characters.
For example you might have numbers in there which are longer than the single characters so this lexing
process just gives you a sequence of tokens and then what you do in the parsing stage you turn those
tokens into some sort of object oriented constructs.
For example if you haven't you Merak expression that would start turning into a combination so a tree
off literals and binary expressions and so on and so forth as you can see right here.
And then of course once you do have the parsed data then it's it's job well done centrally so once you
have the parse data for example you can apply the visitor design pattern to actually go ahead and traverse
this data and maybe perform certain evaluations may be compiled to native code maybe just evaluate it
and print something to the screen it really depends on the language that you're making.