Spirit Applications Repository

This page lists some full applications that use the Spirit parser framework. We invite you to send in your applications for inclusion here. If you wish to contribute, please send an email to: joel-at-boost-consulting-dot-com. The applications listed herein are works of the respective authors. It is the author's responsibility to provide support and maintenance. Should you have any questions, please send the author an email.

Important (Post Skips):

In boost 1.34, if there is a trailing white space characters in an input sequence, parse returns with info.full set to false, even though parsing was (essentially) full. The skip parser is ignored for the last sequence. In 1.33 parsing succeeds as expected. The change in behavior was intentional. See the news in Spirit's home page for details.

Some entries in the repository may not be updated for 1.34 post-skip behavior. If you find such a problem, please contact the author. If you are an author, please find some time to update your application. Thanks!

 

File Author Info
rfc821 Martijn W. van der Lee
martijn-at-v-d-l.com
This is an example using Spirit to verify RFC821-compliant e-mail addresses.
YAC Angus Leeming
YAC is Yet Another Calculator. It has been written as a vehicle with which to investigate some of the Spirit parser framework's powerful facilities. As such, I've put at least as much effort into the documentation as I put into writing the code. My primary hope is that this documentation will prove useful to those thinking of using closures, lambda functions, lazy functions and the functor parser in their own code.
wave Hartmut Kaiser
hartmut.kaiser-at-gmail-dot-com
The Wave C++ preprocessor library is a C++ lexer with ISO/ANSI standard conformant preprocessing capabilities. It exposes an iterator interface, which returns the current preprocessed token from the input stream. This preprocessed token is generated on the fly while iterating over the preprocessor iterator sequence.
PlainCalc James W. Walker
PlainCalc is a buttonless, algebraic-entry, mathematical calculator with variables. To use PlainCalc, type an expression or assignment and press Return or Enter. Unlike most calculators I've seen, PlainCalc allows you to indicate multiplication by juxtaposition, e.g., you can write 2πr instead of 2*π*r. It runs on OS 9 (with CarbonLib) and OS X.
CliPP Peder Holt
CliPP is a C++ library which enables seamless interoperability between C++ and interpreted languages such as javascript. CliPP allows you to expose classes and functions written in C++ to Javascript with a minimum of extra code, and with a minimal impact on your existing code design.

The CliPP package also contains a complete Javascript Parser written using the Spirit library. The Javascript Parser is an independent part of the package, and can be replaced with another parser (not necessarily a javascript parser) if required.
Ecco Kai Ludwig
kml-at-users-sourceforge.net
The kinetic facilities of Ecco (A Compiler for (Electro-)Chemistry) translates any (electro)chemical reaction mechanism including reversible homogeneous reactions, heterogeneous electron transfers, adsorptions and surface reactions into objects representing species, reactions, rate laws, etc. Physicochemical reaction terms are generated as right hand side of ordinary differential equations or as addition to appropiate transport equations, i.e. Reaction-Diffusion-Migration-Convection ( "Nernst-Planck" )equations. Boundary conditions are assembled. All these terms share a common interface which is designed to be used in simulation studies of chemical and/or electrochemical reaction kinetics.
mini Thomas Guest
thomas dot guest at ntlworld dot com
The article A Mini-Project to Decode a Mini-Language describes the development of two Spirit applications -- actually variant implementations of the same DVB Codec application. The first directly decodes DVB sections by using Spirit to parse DVB section formats at runtime. The second uses Spirit to parse the section formats at build time -- generating a C++ file which is then built into the actual codec.
Letrain Antonio Araujo
antoniovazquezaraujo-at-gmail-dot-com
Letrain (The Letter Train Simulator) Letrain is a train simulator made only with letters. Is an object oriented project writed in C++, for curses terminals with extensive use of stl containers and a little language (using boost Spirit) for map and events description. You can design infinite maps in real time crossing and forking rails automatically while the trains are moving around. You can place sensors and semaphores to programs fork changes and locomotive speeds and directions. The train movement is influenced by the number of wagons pulled or pushed, and it can detect train crashes
boolmin Gregor Mitsch
Application that minimizes Boolean functions. You can choose between three input methods. One of them is by formula. Spirit is used to parse and validate the formula the user typed in.
spirit_evaluator Joel Young
David Bergman
spirit_evaluator implements a command line arithmetic expression calculator supporting negation and exponentiation with standard order of operations. Furthermore, it can convert arithmetic expressions from infix notation to textual prefix, postfix, and tree representations. It was developed in g++ 4.1.2 on linux but should build in any boost compatible development environment.
polynomial Andy Elvey, Dan Nuffer
andy-dot-elvey-at-paradise-dot-net-dot-nz
dan-at-nuffer-dot-org
This parser parses a simple polynomial expression ( of the form aX^2 + bX^3 + ... ).
Self Gregory Burd
http://ossus.com/~gburd
Self is a prototype-based dynamic object-oriented programming language, environment, and virtual machine centered around the principles of simplicity, uniformity, concreteness, and liveness. It was last developed by the Self Group at Sun Microsystems Laboratories. I believe the concepts behind and the utility of the Self language warrant modernization, further development and researchers. This project uses Spirit for the new language parser as part of the a new Self Virtual Machine implementation. Without Boost Spirit this project wouldn't have gotten off the ground.
Arabica Jez Higgins
jez-at-jezuk.co.uk
XPath rec parsing support to Arabica; an XML parser toolkit, providing SAX2 and DOM implementations, written in Standard C++.
XEngine Martin Ecker
ecker-at-liwest-dot-at
XEngine is a platform- and rendering-API-independent 3D engine for real- time visualization with support for programmable graphics pipeline architectures and is implemented in C++. The engine aims at flexible support for many of the shading languages available today, so that existing shaders can easily be re-used. This includes current assembler-like languages as well as high-level languages, such as NVIDIA's Cg. In addition, integration of new shading languages should be easily possible with the engine's design.

The Spirit is used in XEngine's shading language parsers.
Fityk Fityk developers
http://www.unipress.waw.pl/fityk/
A curve-fitting program. The Spirit is used for parsing mathematical expressions and Fityk mini-language. http://www.unipress.waw.pl/fityk/
spirit_chess Andy Elvey
andy-dot-elvey-at-paradise-dot-net-dot-nz
A chess parser for Spirit. Should be able to handle any moves using algebraic notation (e.g. Nc5, b2, exf7, f8Q, Rd2 and so on).