Interpreter Design Pattern

Go back

Aliases πŸ“Œ: None

Description πŸ“š: 1 + 2 + 3 is the same as 3 + 3 after evaluating 1 + 2. It means that the grammar is Operation := Operand Operator Operand and Operand can be another Operation.

We will follow this logic to create the interpreter.

Advantages βœ…

  • Useful for a simple language

Disadvantages 🚫

  • Complicated if a language is complex

Notes πŸ“

  • None