O'Reilly logo

Domain Specific Languages by Martin Fowler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 26. Embedded Interpretation

Embed interpreter actions into the grammar, so that executing the parser causes the text to be directly interpreted to produce the response.

image

There are many occasions where you may want to run a DSL script and get an immediate result, such as performing a calculation or running a query. Embedded Interpretation interprets the DSL script during parsing, so the result of the parse is the result of the script itself.

26.1 How It Works

Embedded Interpretation works by evaluating DSL expressions as soon as possible, collating results together, and returning the overall result. Embedded Interpretation does not use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required