Welcome to Spirit

Spirit is a set of C++ libraries for parsing and output generation implemented as Domain Specific Embedded Languages (DSEL) using Expression templates and Template Meta-Programming. The Spirit libraries enable a target grammar to be written exclusively in C++. Inline grammar specifications can mix freely with other C++ code and, thanks to the generative power of C++ templates, are immediately executable.

Spirit is part of Boost Libraries, a peer-reviewed, open collaborative development effort.

Dec ’09 05

In the good tradition of highlighting Spirits both major sub-libraries based on similar use cases I will talk about Karma today. In a previous installment (see Creating Your Own Parser Component for Spirit.Qi) I presented the steps needed to create a parser terminal. Our topic here is the creation of a new generator directive allowing to group output elements in columns.

See the full article here.

Tagged with:
Nov ’09 27

This is another article in the series of “How To’s” providing you with shrink wrapped grammars directly usable in any project. I’m going to describe a Karma grammar you can use to generate output for quoted strings, where all contained special characters are properly escaped.

See full article here.

Tagged with:
Nov ’09 18

Even if it feels a bit like cheating I decided to get back to the example highlighting lists of key/value pairs I initially wrote about here. On the other hand looking at this very same problem from the standpoint of generating output allows me to highlight a couple a interesting facilities Spirit provides you with.

See full article here.

Tagged with:
preload preload preload