concept interpreter in category dsl

appears as: interpreter, n Interpreter, n interpreter
DSLs in Action

This is an excerpt from Manning's book DSLs in Action.

Groovy has scripting abilities. Any Groovy code can be executed through the interpreter and you can use this Groovy power to set up an interactive execution environment for your order-processing DSL. Enter the DSL implementation (listing 2.2) in a file called ClientOrder.groovy. Enter the usage snippet in another text file named order.dsl. Make sure that both are in classpath, then submit the following script to the Groovy interpreter:

In our second iteration, we’re going to roll out an interpreter that’ll interpret Bob’s language, chop off the frills, and extract the essence needed to build the necessary abstractions. Here’s how it’ll look when we’re done:

Listing 5.6. Trade DSL in Ruby, as an interpreter (Iteration 2)