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.
Feb ’11 26
Frank Dellaert was asking a valid question on the Spirit mailing list where he pointed out some things he was not able to understand. His question clearly uncovered an inconsistency in Spirit’s API. This lead us to implement some minor additional feature, which in the end turned out to make more uniform the way semantic actions are handled.
Continue reading »
Feb ’11 12
Narinder Claire asked a seemingly innocent question on the Spirit mailing list the other day. After starting to write an answer I realized that this question is not innocent at all as it touches the very fabric of Spirit: the rules of attribute handling. Many people have a hard time to properly understand what is going on in the nether regions of Spirit. More importantly, they have a hard time to understand why is Spirit implemented the way it is.
The new article Attribute Propagation and Attribute Compatibility not only answers Narinders questions but tries to explain those important concepts in more detail.
Jan ’10 05
We got many questions how to parse data which has to be accessed using a standard input stream (usually a std::istream) without having to read all of the data into memory first.
The standard way of iterating over a stream would be to wrap it into a std::istream_iterator, but unfortunately this is not possible. Qi requires iterators to be at least forward iterators, while the std::istream_iterator is an input iterator only. To overcome this limitation Spirit V2.2 (the next version of Spirit, to be released with Boost V1.42) will implement a new iterator.
Continue reading »
Dec ’09 21
I added a page for FAQ entries. This page will contain FAQ entries which will eventually be incorporated into the FAQ section of the documentation.
See the page here.
Nov ’09 19
Somehow, this did not make it into the 2.1 documentation. This important piece of information shouldn’t languish too far into the abyss. So here it is…