Nov 27

Generate Escaped String Output Using Spirit.Karma

By Hartmut Kaiser Karma Example Comments Off on Generate Escaped String Output Using Spirit.Karma

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.

GD Star Rating
loading...
Tagged with:
Nov 26

Spirit V2.1 Compiler Compatibility

By Hartmut Kaiser General Comments Off on Spirit V2.1 Compiler Compatibility

We started to collect the information about what compilers and platforms can be used to compile applications based on Spirit V2.1. Please add any compiler and platform you have been using successfully to compile your Spirit applications.

For a list of known compilers go here.

GD Star Rating
loading...
Tagged with:
Nov 24

On this new page we collect projects and products using Boost.Spirit. This list is not exhaustive as we certainly don’t know about every use. Spirit is a Boost library making it readily available to a large number of developers. If you want your product, in house use, or open source project to be included in this list, please send a note to the Spirit Mailing List or simply add a comment below and we’ll gladly add the info.

See the full list here.

GD Star Rating
loading...
Tagged with:
Nov 20

Creating Your Own Parser Component for Spirit.Qi

By Hartmut Kaiser Qi Example Comments Off on Creating Your Own Parser Component for Spirit.Qi

Several people have been asking the question of how it would be possible to access the current iterator position from a semantic action. Different solutions have been proposed, all of them somehow abusing the predefined Qi directive raw[] which normally exposes as its attribute the pair of iterators pointing to the range in the input stream matched by the embedded parser. I thought this to be a nice incentive to write about how you can create your own parser components.

See full article here.

GD Star Rating
loading...
Tagged with:
Nov 20

A PDF build of the documentation for Boost-1.41 (from John Maddock) is now available here:

Thank you, John!

I extracted and uploaded the Spirit 2.1 documentation here: http://boost-spirit.com/dl_docs/spirit2_1.pdf

Have fun!

P.S. Don’t forget to visit this site every once in a while. We are posting tips, tutorials and addendum. Check out the Articles section.

GD Star Rating
loading...
Tagged with:
Nov 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…

GD Star Rating
loading...
Tagged with:
Nov 19

Why would you want to upgrade to Spirit2 from “Classic” Spirit?

Here’s a teaser:

Spirit 1.x [ straight pattern matching (no actions)  ]
real    0m0.359s
user   0m0.332s
sys     0m0.012s

Spirit 1.x [ parse tree generation ]
real    0m9.305s
user   0m9.209s
sys     0m0.076s

Spirit 2.1 [ AST with variant nodes generation ]
real    0m0.459s
user   0m0.432s
sys     0m0.028s

Check out this short article.

GD Star Rating
loading...
Tagged with:
Nov 19

Champagne to us all 🙂

The much-awaited Spirit 2.1 is now released after more than 2 years in beta (Spirit 2.0). Boost release 1.41.0 includes Spirit 2.1. This is the official release of the new Spirit 2.1, a completely new library for parsing, lexing, and output generation.

Boost release 1.41.0 is now available!

This release contains one new library and numerous bug fixes for existing libraries. For details, including download links, see
http://www.boost.org/users/news/version_1_41_0

The release can also be downloaded directly from SourceForge. See
http://sourceforge.net/projects/boost/files/

To install this release on your system, see
http://www.boost.org/doc/libs/1_41_0/more/getting_started/index.html

Thanks,

–The Boost release team

GD Star Rating
loading...
Tagged with:
Nov 18

Output Generation from a List of Key-Value Pairs Using Spirit.Karma

By Hartmut Kaiser Karma Example Comments Off on Output Generation from a List of Key-Value Pairs Using Spirit.Karma

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.

GD Star Rating
loading...
Tagged with:
Nov 17

Zero to 60 MPH in 2 seconds!

By Joel de Guzman Qi Example Comments Off on Zero to 60 MPH in 2 seconds!

Wanna make a blazingly fast rule? Use BOOST_AUTO! Check it out here. The code defines a named rule using C++0x auto when available and falls back to some template wizardry on older compilers.

See full article here.

GD Star Rating
loading...
Tagged with:
Nov 17

Nabialek trick

By Joel de Guzman Qi Example Comments Off on Nabialek trick

This sample is a port of the original “Nabialek trick” from classic Spirit.

See full article here.

GD Star Rating
loading...
Tagged with:
Nov 15

Parsing a List of Key-Value Pairs Using Spirit.Qi

By Hartmut Kaiser Qi Example Comments Off on Parsing a List of Key-Value Pairs Using Spirit.Qi

One of the goals of this blog is to provide shrink wrapped solutions for small everyday parsing and output generation problems. We hope to show how Spirit may be used to simplify the life for you as a C++ programmer related to data conversion problems from some external representation to your internal data structures and vice versa.

See full article here.

GD Star Rating
loading...
Nov 14

Using Spirit V2.1 With Older Versions of Boost (pre V1.41)

By Hartmut Kaiser Spirit2 Release Comments Off on Using Spirit V2.1 With Older Versions of Boost (pre V1.41)

Would you like to try the new version of Spirit but you are stuck with an older version of Boost? If yes, don’t despair, there might be help!

See full article here.

GD Star Rating
loading...
Nov 06

Spirit V2.1 will be released with Boost V1.41

By Hartmut Kaiser Spirit2 Release Comments Off on Spirit V2.1 will be released with Boost V1.41

Now, as the release of the new Spirit version is at our doorstep, I would like to whet your appetite. Let’s start with a list of high level things worth knowing.

See full article here.

GD Star Rating
loading...
Nov 01

Boost 1.41 release is coming vey soon, along with it, the much awaited Spirit version 2.1. It’s about time we have a major website makeover. Check out the new site for Spirit 2.1 (in beta).

  • Finally settled on WordPress. It does the job wonderfully, with minimum fuss, and it has great support.
  • The new docs are uploaded. The search box should be available once Google starts to index the new site (I already submitted a sitemap) for the Google Custom Search.
GD Star Rating
loading...
preload preload preload