© Thomas Mailund 2018

Thomas Mailund, Domain-Specific Languages in R, https://doi.org/10.1007/978-1-4842-3588-1_2

2. Matrix Expressions

Thomas Mailund

(1)Aarhus N, Staden København, Denmark

In the next chapter we discuss computer languages in a more theoretical way, but here we will consider a concrete case—the matrix expressions mentioned in Chapter 1. This example is a relatively simple domain-specific language, but parsing matrix expressions, optimizing them, and then evaluating them are all the phases we usually have to implement in any DSL, and the implementation will also have examples of most of the techniques we will cover in more detail later. The example will use some tricks that I will not explain until later in the book, so some aspects ...

Get Domain-Specific Languages in R: Advanced Statistical Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.