Joel de Guzman, Hartmut Kaiser: A Framework for RAD Spirit
Channel: CppNow
Date: 31/10/2013

One allure of Boost Spirit Parser, compared to traditional parser
generators, is its being embedded in C++. The user of the library
specifies a parser's grammar directly in C++ code using expression
templates. There are distinct advantages with this approach, but there
are problems as well. The most glaring drawbacks are 1) long compile
times and 2) difficult to understand error messages and 3) Difficulty in
debugging and testing parsers. For small parsing tasks, these can be
tolerated. Yet, after 8 years in active deployment, we've come to a
point where Spirit is being used in increasingly more complex parsing
tasks. 2 and 3 can somehow be alleviated by adding more "smarts" to the
expression template engine (using Proto), but that would increase
compile times further to the point where the libary will no longer be
useful.

It would be interesting to have a tool (both stand-alone or library
based) that accepts textual EBNF/PEG expressions and outputs either
parsers that are immediately executable or C++ Boost Spirit code. The
RAD tool can have all sorts of smarts to make writing parsers as
painless as possible (e.g. debugging, error handling, analysis, etc).
After the development of the parser is "set in stone", one can opt to
have the tool emit C++ code that can then be included in an application.
For more complex parsers, this will be a definite boon.

We would like to present the design and development of such a tool.
Obviously, this "Dynamic Spirit" tool will be written using "static"
Spirit. This would be a practical real world example using Spirit.
---

*--*

---