Jun 26
DVSL: An Alternative to XSLT
Dec 10
Spirit Vs. Lex/yacc/et al.
What are the differences and when should I use one or the other?
Read more
Oct 13
Writing a custom check macro for the BOOST test library
In this article I demonstrate how to write your own check macros for the boost test library (not guaranteed to work in the future)
Full source code for this example can be downloaded here.
Read more
Sep 13
A Better Binary File Generator DSL in Ruby
In Creating a Binary File Using a Ruby DSL I did a very small example of using a ruby DSL to generate complex binary files without having to use C or a hexeditor. I’ve beefed it up significantly since then so here is the updated version of h2b.irb.
Read more
Sep 6
Verifying Code Examples in your Documentation
One of the more annoying aspects of writing developer documentation is that it is very easy for your code examples to get out of date, develop typos, etc(As those reading previous articles may have noticed). In this article I use docbook, xslt, and automake to generate code examples that are guaranteed to compile.
Read more
Jul 20
What is a C++ Functor?
Jul 20
Boost Spirit Part II (Attaching Actions to Your Grammar)
In the last article we covered how to define a grammar in the boost spirit library. This article will show you how to use the data parsed by the grammar with actions. The code for this example is here.
Read more
Jul 1
Boost Spirit Part I (Validating Against a Grammar)
I haven’t done a post in a while, but I thought the boost spirit library was worth an entry. Spirit provides a way of specifying and parsing a custom language grammar right inline in C++ without the need for a code generator like lex/yacc. Spirit makes it so easy to specify and use a grammar that you should never hand write even the most trivial parser again.
The full code for this example can be found here.
5 comments