<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Boost.Spirit</title>
	
	<link>http://boost-spirit.com/home</link>
	<description>Home of The Boost.Spirit Library</description>
	<lastBuildDate>Sat, 24 Jul 2010 02:46:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Boost-Spirit" /><feedburner:info uri="boost-spirit" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Phoenix3 GSOC project</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/O3pNJe_vmu4/</link>
		<comments>http://boost-spirit.com/home/2010/07/23/phoenix3-gsoc-project/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 02:36:08 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1133</guid>
		<description><![CDATA[Thomas Heller has just completed the Phoenix Proto port. Another successful GSOC project! I&#8217;ve been mentoring for GSOC for a couple of years now. This one is the best (the Fusion 0x project of last year&#8217;s GSOC was also highly successful, but it was Hartmut Kaiser who mentored that). Thomas is an amazing student! A++, [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (4 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>Thomas Heller has just completed the Phoenix Proto port. Another successful GSOC project!</p>
<p>I&#8217;ve been mentoring for GSOC for a couple of years now. This one is the best (the Fusion 0x project of last year&#8217;s GSOC was also highly successful, but it was Hartmut Kaiser who mentored that). Thomas is an amazing student! A++, if there&#8217;s such a thing.</p>
<p>Here&#8217;s Thomas&#8217; post on the Boost mailing list:</p>
<blockquote><p>Ladies and Gentlemen,</p>
<p>I proudly announce that the port of phoenix3 is completed! All  testcases pass! (some with minor modifications)</p>
<p>So, What is next? Here is my proposed schedule:</p>
<ul>
<li> fix some minor issues</li>
<li> improve boost.bind compatibility: make all boost.bind testcases pass</li>
<li> implement all boost.lambda testcases and make them pass, as far as it is reasonable</li>
<li> add support for C++0x lambdas</li>
<li> make interoperability testcases for std::function, boost::function</li>
<li> adapt the documentation</li>
<li> clean up code (some parts are a little messy as of now)</li>
<li> improve compile time</li>
</ul>
<p>Did I miss something?</p>
<p>This is a very tight schedule, I may not be able to finish all points during the GSoC period. Any help will be appreciated. Additionally a review of the current code is highly appreciated to point out some defects that might exist.</p>
<p>The code can be checked out at:<br />
<a href="https://svn.boost.org/svn/boost/sandbox/SOC/2010/phoenix3">https://svn.boost.org/svn/boost/sandbox/SOC/2010/phoenix3</a></p>
<p>I will be happy to answer your questions!</p>
<p>Additionally I would like to thank Joel de Guzman and Eric Niebler for their great assistance and initial designs!</p></blockquote>
<p>So why is this relevant? Here&#8217;s more from Eric Niebler:</p>
<blockquote><p>Let me expand a bit on Thomas&#8217; post with my own perspective. Currently, the expressions created by Boost.Bind, Boost.Lambda and Boost.Phoenix2 are black boxes. You can pass them to std algorithms for evaluation, but that&#8217;s about it.</p>
<p>In contrast, the expressions created by Boost.Phoenix3 will the Proto expressions. If Phoenix3 is the compiler of a C++-in-C++ domain specific language, then the Proto expression is the intermediate form. It will be documented and part of the Phoenix3 API. The grammar for valid Phoenix3 expressions will also be documented and extensible. For the first time, we will have a way to generate C++-like expression trees, just like the C++ compiler itself does. We have a standard way (Proto) to traverse and manipulate them. Sure, you can just evaluate them as you could before, but now you can do much more. For instance, you can define your own Proto transforms to:</p>
<ul>
<li>Do various optimizations, just like a real compiler</li>
<li>Add your own custom evaluation strategies for operations on your types</li>
<li>Rewrite Phoenix3 expressions for parallel execution, or whatever</li>
<li>???!!!</li>
</ul>
<p>Essentially, it means Phoenix3 is a white box, an open platform. Third parties can use just the Phoenix3 front end and intermediate form, substituting their own back ends to make the expressions mean and do completely different and domain-specific things.</p>
<p>Expect to see Phoenix3 expressions showing up in other DSEL contexts. It&#8217;s hard to predict how people will use this. The possibilities are really limitless.</p></blockquote>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (4 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=O3pNJe_vmu4:iPMBRkq9EyY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/O3pNJe_vmu4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/07/23/phoenix3-gsoc-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/07/23/phoenix3-gsoc-project/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=phoenix3-gsoc-project</feedburner:origLink></item>
		<item>
		<title>Best Practices</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/_aW1wzKwOnM/</link>
		<comments>http://boost-spirit.com/home/2010/06/23/best-practices-2/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 04:18:39 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1101</guid>
		<description><![CDATA[We have a new page enumerating the best practices for using Spirit. Right now, there&#8217;s only one entry (update: there may be more by the time you read this), but as time goes by, we will be filling this page with more. If you have a short Spirit tip to share, this is the page. [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>We have a new page enumerating the best practices for using Spirit. Right now, there&#8217;s only one entry (update: there may be more by the time you read this), but as time goes by, we will be filling this page with more. If you have a short Spirit tip to share, this is the page. Add a comment and we&#8217;ll incorporate them.</p>
<p><a href="http://boost-spirit.com/home/articles/doc-addendum/best-practices/">See the &#8220;Best Practices&#8221; page here.</a></p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=_aW1wzKwOnM:AcYvYIkoEP0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/_aW1wzKwOnM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/06/23/best-practices-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/06/23/best-practices-2/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=best-practices-2</feedburner:origLink></item>
		<item>
		<title>I Love my Spirit T-shirt</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/3nyxtPAx3m0/</link>
		<comments>http://boost-spirit.com/home/2010/06/18/i-love-my-spirit-t-shirt/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 00:57:50 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1087</guid>
		<description><![CDATA[Awesomeness&#8230; Michael Caisse of Object Modeling Designs designed this cool Spirit inspired T-shirt. I love it so much. If you like Spirit as much as we do, you can get one from Michael here: http://objectmodelingdesigns.com/swag.html Rating: 4.7/5 (3 votes cast)<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=4.7" /></div><div>Rating: 4.7/<strong>5</strong> (3 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p><a href="http://objectmodelingdesigns.com/swag.html"><img class="alignleft size-full wp-image-1088" title="Spirit-shirt front" src="http://boost-spirit.com/home/wp-content/uploads/2010/06/280.png" alt="Spirit-shirt front" width="126" height="126" /></a><strong>Awesomeness&#8230;</strong></p>
<p>Michael Caisse of <a href="http://objectmodelingdesigns.com/index.html">Object Modeling Designs</a> designed this cool Spirit inspired T-shirt. I love it so much. If you like Spirit as much as we do, you can get one from Michael here: <a href="http://objectmodelingdesigns.com/swag.html">http://objectmodelingdesigns.com/swag.html</a></p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=4.7" /></div><div>Rating: 4.7/<strong>5</strong> (3 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=3nyxtPAx3m0:rGWtYwoqrKM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/3nyxtPAx3m0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/06/18/i-love-my-spirit-t-shirt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/06/18/i-love-my-spirit-t-shirt/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=i-love-my-spirit-t-shirt</feedburner:origLink></item>
		<item>
		<title>Spirit: History and Evolution</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/kOXOrKlXQ7s/</link>
		<comments>http://boost-spirit.com/home/2010/05/16/spirit-history-and-evolution/#comments</comments>
		<pubDate>Mon, 17 May 2010 00:06:20 +0000</pubDate>
		<dc:creator>Hartmut Kaiser</dc:creator>
				<category><![CDATA[BoostCon 2010]]></category>
		<category><![CDATA[Spirit]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/2010/05/16/spirit-history-and-evolution/</guid>
		<description><![CDATA[Yes, we were tempted to call our second BoostCon talk &#8216;Design and Evolution&#8217;, but we decided to to be modest. We wanted to give a very brief overview of the way Spirit has evolved over the last decade. While talking about a period of time this long in 90 minutes has to be very brief [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>Yes, we were tempted to call our second BoostCon talk &#8216;Design and Evolution&#8217;, but we decided to to be modest. We wanted to give a very brief overview of the way Spirit has evolved over the last decade. While talking about a period of time this long in 90 minutes has to be very brief we nevertheless tried to highlight the main stepping stones and milestones in Spirits development. For me, developing the slides for &#8216;Spirit: History and Evolution&#8217; was real fun: looking through ancient email archives, re-reading key private conversations, and realizing that most of the ideas implemented today have been already in place from the early years. All of this was exciting. To some extent, this even turned out to be educational.</p>
<p>I have to admit I was not sure how people would react to this kind of talk. It was not one of the usual, sophisticated, well thought through, and cutting edge presentations normally seen at BoostCon. This talk was merely a conversation with the attendees about Boost&#8217;s history guided by Spirits evolution. In the end I was relieved to see people reacted positively. Some came to me afterwards saying they enjoyed listening. For all of you not being at BoostCon, here are the slides: <a href="http://boost-spirit.com/home/wp-content/uploads/2010/05/Spirit-History-and-Evolution.pdf">Spirit: History and Evolution</a>.</p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=kOXOrKlXQ7s:UtBNTWP-Tb4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/kOXOrKlXQ7s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/05/16/spirit-history-and-evolution/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/05/16/spirit-history-and-evolution/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=spirit-history-and-evolution</feedburner:origLink></item>
		<item>
		<title>Using Spirit V2: Qi and Karma</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/BGDC-8UnHtg/</link>
		<comments>http://boost-spirit.com/home/2010/05/13/using-spirit-v2-qi-and-karma/#comments</comments>
		<pubDate>Thu, 13 May 2010 14:47:20 +0000</pubDate>
		<dc:creator>Hartmut Kaiser</dc:creator>
				<category><![CDATA[BoostCon 2010]]></category>
		<category><![CDATA[Karma]]></category>
		<category><![CDATA[Qi]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/2010/05/13/using-spirit-v2-qi-and-karma/</guid>
		<description><![CDATA[Michael Caisse (of Object Modeling Designs), some of you will know him from the Freenode #boost IRC channel, presented his talk about Spirit at BoostCon 2010 last Tuesday. I personally very much like listening to his knowledgeable and entertaining presentations. Apparently many people do so as well, the room he presented in was overfull. People [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (6 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p><a href="http://boost-spirit.com/home/wp-content/uploads/2010/05/DSC03002.jpg"><img class="size-thumbnail wp-image-1077 alignleft" title="DSC03002" src="http://boost-spirit.com/home/wp-content/uploads/2010/05/DSC03002-e1273837407971-150x150.jpg" alt="" width="95" height="95" /></a>Michael Caisse (of <a href="http://www.objectmodelingdesigns.com/">Object Modeling Designs</a>), some of you will know him from the Freenode #boost IRC channel, presented his talk about Spirit at BoostCon 2010 last Tuesday. I personally very much like listening to his knowledgeable and entertaining presentations. Apparently many people do so as well, the room he presented in was overfull. People even sat on the floor as all seats were taken. So in case you are interested &#8211; here is a link to his slides: <a href="http://boost-spirit.com/home/wp-content/uploads/2010/05/spirit_presentation.pdf">Using Spirit V2: Qi and Karma</a>.</p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (6 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=BGDC-8UnHtg:y-FqySqkRjU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/BGDC-8UnHtg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/05/13/using-spirit-v2-qi-and-karma/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/05/13/using-spirit-v2-qi-and-karma/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=using-spirit-v2-qi-and-karma</feedburner:origLink></item>
		<item>
		<title>A Framework for RAD Spirit</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/Wdkj5VZbetI/</link>
		<comments>http://boost-spirit.com/home/2010/05/11/a-framework-for-rad-spirit/#comments</comments>
		<pubDate>Tue, 11 May 2010 14:44:48 +0000</pubDate>
		<dc:creator>Hartmut Kaiser</dc:creator>
				<category><![CDATA[BoostCon 2010]]></category>
		<category><![CDATA[Build a Compiler]]></category>
		<category><![CDATA[Karma]]></category>
		<category><![CDATA[Qi]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/2010/05/11/a-framework-for-rad-spirit/</guid>
		<description><![CDATA[Finally, yesterday was the day! Joel and I presented the current status of our work related to the &#8216;Writing a Compiler&#8217; effort. We submitted this talk to BoostCon 2010 and got accepted back in January. Having to present at BoostCon just put a nice pressure onto us to get moving and to start working on [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>Finally, yesterday was the day! Joel and I presented the current status of our work related to the &#8216;Writing a Compiler&#8217; effort. We submitted this talk to BoostCon 2010 and got accepted back in January. Having to present at BoostCon just put a nice pressure onto us to get moving and to start working on the project. I don&#8217;t want to go into any detail about the presentation itself. This will be done in future articles to be published after BoostCon. I just wanted to provide a link to the slides for those interested in having a look. Ok, here we go: <a href="http://boost-spirit.com/home/wp-content/uploads/2010/05/A_Framework_for_RAD_Spirit.pdf">A Framework for RAD Spirit</a>, grab it while it&#8217;s hot!</p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=Wdkj5VZbetI:6GHrb41tThg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/Wdkj5VZbetI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/05/11/a-framework-for-rad-spirit/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/05/11/a-framework-for-rad-spirit/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=a-framework-for-rad-spirit</feedburner:origLink></item>
		<item>
		<title>Next Week is BoostCon Week!</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/596Bb6TGaqU/</link>
		<comments>http://boost-spirit.com/home/2010/05/08/next-week-is-boostcon-week/#comments</comments>
		<pubDate>Sun, 09 May 2010 01:11:40 +0000</pubDate>
		<dc:creator>Hartmut Kaiser</dc:creator>
				<category><![CDATA[BoostCon 2010]]></category>
		<category><![CDATA[Build a Compiler]]></category>
		<category><![CDATA[Karma]]></category>
		<category><![CDATA[Qi]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/2010/05/08/next-week-is-boostcon-week/</guid>
		<description><![CDATA[Finally, the long wait and the preparations for BoostCon 2010 are over. The last weeks were dominated by writing the code and creating the slides for our talk &#8216;A Framework for RAD Spirit&#8216;. Regular readers of this site probably have already wondered why we have been inactive here since mid-March. Well, that is mainly because [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Finally, the long wait and the preparations for <a href="http://www.boostcon.com/">BoostCon 2010</a> are over. The last weeks were dominated by writing the code and creating the slides for our talk &#8216;<a href="http://www.boostcon.com/program/sessions#de-guzman-kaiser-rad-spirit">A Framework for RAD Spirit</a>&#8216;. Regular readers of this site probably have already wondered why we have been inactive here since mid-March. Well, that is mainly because of preparing for BoostCon turned out to be too time consuming to leave any room for writing posts and articles.</p>
<p><span id="more-1064"></span></p>
<p>Our  talk (Joel&#8217;s and mine) is about the current status and the preliminary results we achieved while working on the compiler project <a href="http://boost-spirit.com/home/category/build-a-compiler/">announced earlier</a>. We settled for applying a Scheme based framework to create a rapid development environment for Spirit parsers. This is a really exciting project which will have long term impact not only on Spirit.</p>
<p>Here is a sneak preview of what we will present at BoostCon.</p>
<p style="text-align: center;"><a href="http://boost-spirit.com/home/wp-content/uploads/2010/05/AFrameworkforRADSpirit.png"><img class="size-full wp-image-1069 aligncenter" title="AFrameworkforRADSpirit" src="http://boost-spirit.com/home/wp-content/uploads/2010/05/AFrameworkforRADSpirit.png" alt="" width="610" height="355" /></a></p>
<p style="text-align: left;">As you can see, we created a kernel consisting out of a cool data structure called U-tree (essentially a discriminated union), capable of storing any  S-expression. On top of this Joel developed a Scheme compiler/interpreter which first constructs a dynamic expression tree from the S-expression (the compiler) conforming to the usual Scheme execution rules. Executing this expression tree yields the result encoded in the Scheme code which has been stored in the S-expression in the first place (the interpreter).</p>
<p>As a byproduct of this we got the beginnings of a new library – the dynamic counterpart of <a href="http://www.boost.org/doc/libs/1_43_0/libs/spirit/phoenix/doc/html/index.html">Boost.Phoenix</a>. It is aimed at dynamic execution trees based on functional programming paradigms. So the Scheme compiler creates a functional data structure which is indistinguishable from an equivalent data structure created from a C++ expression built on top of this new library.</p>
<p>In order to fill the S-expression from Scheme code we developed a Spirit based parser. OTOH, the Scheme generator (written using Karma &#8211; what else?) takes any S-expression and converts it back to the equivalent Scheme code.</p>
<p>The (currently) top most layer of the framework consists of a Parser for Qi expressions which creates an S-expression and a corresponding generator converting any S-expression holding a Qi parser back into the equivalent Qi (C++) expression. Naturally, the Qi parser is written using Qi and for the Qi Generator we utilized Karma. The Qi compiler mentioned in the figure takes such an S-expression and produces an execution tree, which – when actually run &#8211; parses any input conforming to the initial Qi grammar.</p>
<p>I don&#8217;t want to spoil the fun and tell too much at this point, but overall this is not only a nice example of how to write more complex Spirit applications, but it gives you a rapid development platform allowing to quickly test Qi parsers. Moreover, as the whole thing is based on a Scheme kernel, you can write your own Scheme code for additional transformations of the handled S-expressions. In the context of the Qi based S-expressions mentioned above this is equivalent to dynamic parser transformations or arbitrary parser analysis modules. That is pretty powerful stuff!</p>
<p>Joel and I plan to write about what we developed and what we learnt while developing this and we hope to get some of you interested to chime in. There is still a lot to do, we are by no means done with this framework. And, as I mentioned already, I believe this will have an impact far beyond its initial target audience.</p>
<p>But BoostCon is not only about Spirit (even if there will be at least 3 talks about it). We will have a full week packed with sessions presented by well known Boost people speaking about a whole set of interesting topics. Just have a look at the <a href="http://www.boostcon.com/program#schedule">BoostCon schedule</a> to convince yourself. Over the next week I will try to document some of my impressions live from the Physics Center in Aspen (where BoostCon takes place). So stay tuned!</p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=0.0" /></div><div>Rating: 0.0/<strong>5</strong> (0 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=596Bb6TGaqU:5dsCjHBOTts:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/596Bb6TGaqU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/05/08/next-week-is-boostcon-week/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/05/08/next-week-is-boostcon-week/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=next-week-is-boostcon-week</feedburner:origLink></item>
		<item>
		<title>S-expressions and variant</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/sbyo3KJU_zE/</link>
		<comments>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 00:24:42 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Build a Compiler]]></category>
		<category><![CDATA[Qi Example]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1039</guid>
		<description><![CDATA[I have a mixed relationship with variant&#8230; I just wrote a parser for S-expressions (that will be the basis of ASTs and intermediate types in my planned &#8220;write-a-compiler&#8221; article series). The parser itself is easy, but as always, I spent more time on the underlying data structures. What are S-expressions? S-expressions, also called sexps, are [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>I have a mixed relationship with variant&#8230;</p>
<p>I just wrote a parser for S-expressions (that will be the basis of ASTs and intermediate types in my planned &#8220;write-a-compiler&#8221; article series). The parser itself is easy, but as always, I spent more time on the underlying data structures. </p>
<p><span id="more-1039"></span> </p>
<p>What are S-expressions? S-expressions, also called sexps, are recursive, list based, data structures. Being recursive, they can represent hierarchical information. S-expressions are parenthesized prefix expressions, known for their use in LISP (and its sibling Scheme). Here&#8217;s a simple sexp:</p>
<pre class="brush: cpp;">
(* 2 (+ 3 4))
</pre>
<p>The sexp above corresponds to this infix expression:</p>
<pre class="brush: cpp;">
(2 * (3 + 4))
</pre>
<p>S-expressions are simple and infinitely powerful beasts as evident in applications that use LISP as their scripting language. They can represent code and data. Some people even use S-expressions as a suitable (and terser!) replacement for XML. The in-memory data structures are very easy to use, transform and manipulate, traverse and compile or accumulate results from.</p>
<p>The plan is to use S-expressions as our AST representation and embed a minimal LISP/Scheme interpreter <strong>IN</strong> the compiler. This implies that along the way, we&#8217;ll be building an S-expression parser and a LISP/Scheme interpreter. How cool is that? &#8230; We&#8217;re talking about scripting the compiler with an interpreter! <img src='http://boost-spirit.com/home/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>I needed a dynamic data type that can represent the S-expressions. I called it utree, short for universal-tree. I want it to be as simple as it can be and fast and tight in memory footprint. Boost variant was simply out of the question (I used it in one early prototypes). For one, it failed a basic requirement (tight memory footprint). The padding and the way it aligns the &#8220;what-type&#8221; integer member is quite wasteful. It uses a conservative alignment using the worst alignment of the types in the union. Thus if you have a type in there that aligns to 8 bytes, variant requires another 8 bytes just for the type discriminator! Try it out:</p>
<pre class="brush: cpp;">
struct x { void* a; void* b; void* c; };
/***/
std::cout &lt;&lt; sizeof(x) &lt;&lt; std::endl;
std::cout &lt;&lt; sizeof(boost::variant&lt;x, int, double&gt;) &lt;&lt; std::endl;
</pre>
<p>I get: 12 and 24 respectively (32 bit system).</p>
<p>I ended up with 40 bytes in my initial prototype (using STL containers and variant) and later squeezed that to 24 (minimum). I did away with variant in my latest version and got 16 bytes. In this case, I &#8220;stole&#8221; unused padding bits from the data to store the discriminator.   With this 16 bytes, I have nil, bool, int, double, string and (double linked) list. The string itself steals memory when it can (i.e. it stores the string in the union when it can and only uses the heap when needed). The string steals as much as it can. So, on 32 bit systems, it can store in-situ as much as 14 bytes. That&#8217;s a lot for storing simple strings like symbols and identifiers. On 64 bit systems, you can store a lot more in-situ and minimize heap usage more.</p>
<p>At this point, I feel like writing my own variant type that can do such things (intrusive variant?). Barring the use of Boost.Variant, I needed to write my own data structures (double linked list). I really wanted to use Boost.Intrusive which is quite efficient, but because I had to squeeze my own variant in there, I had to make use of unions which require PODs!</p>
<p>Here&#8217;s the work in progress:<br />
<a href="http://boost-spirit.com/dl_more/scheme/scheme_v0.2/">http://boost-spirit.com/dl_more/scheme/scheme_v0.2/</a></p>
<p>Here&#8217;s the utree API:</p>
<pre class="brush: cpp;">

    ///////////////////////////////////////////////////////////////////////////
    // The main utree (Universal Tree) class
    // The utree is a hierarchical, dynamic type that can store:
    //  - a nil
    //  - a bool
    //  - an integer
    //  - a double
    //  - a string (textual or binary)
    //  - a (doubly linked) list of utree
    //  - a reference to a utree
    //
    // The utree has minimal memory footprint. The data structure size is
    // 16 bytes on a 32-bit platform. Being a container of itself, it can
    // represent tree structures.
    ///////////////////////////////////////////////////////////////////////////
    class utree
    {
    public:

        typedef utree value_type;
        typedef detail::list::node_iterator&lt;utree&gt; iterator;
        typedef detail::list::node_iterator&lt;utree const&gt; const_iterator;
        typedef utree&amp; reference;
        typedef utree const&amp; const_reference;
        typedef std::ptrdiff_t difference_type;
        typedef std::size_t size_type;

        struct nil {};

        utree();
        explicit utree(bool b);
        explicit utree(unsigned int i);
        explicit utree(int i);
        explicit utree(double d);
        explicit utree(char const* str);
        explicit utree(char const* str, std::size_t len);
        explicit utree(std::string const&amp; str);
        explicit utree(boost::reference_wrapper&lt;utree&gt; ref);

        utree(utree const&amp; other);
        ~utree();

        utree&amp; operator=(utree const&amp; other);
        utree&amp; operator=(bool b);
        utree&amp; operator=(unsigned int i);
        utree&amp; operator=(int i);
        utree&amp; operator=(double d);
        utree&amp; operator=(char const* s);
        utree&amp; operator=(std::string const&amp; s);
        utree&amp; operator=(boost::reference_wrapper&lt;utree&gt; ref);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree const&amp; x, F f);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree&amp; x, F f);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree const&amp; x, utree const&amp; y, F f);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree&amp; x, utree const&amp; y, F f);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree const&amp; x, utree&amp; y, F f);

        template &lt;typename F&gt;
        typename F::result_type
        static visit(utree&amp; x, utree&amp; y, F f);

        template &lt;typename T&gt;
        void push_back(T const&amp; val);

        template &lt;typename T&gt;
        void push_front(T const&amp; val);

        template &lt;typename T&gt;
        iterator insert(iterator pos, T const&amp; x);

        template &lt;typename T&gt;
        void insert(iterator pos, std::size_t, T const&amp; x);

        template &lt;typename Iter&gt;
        void insert(iterator pos, Iter first, Iter last);

        template &lt;typename Iter&gt;
        void assign(Iter first, Iter last);

        void clear();
        void pop_front();
        void pop_back();
        iterator erase(iterator pos);
        iterator erase(iterator first, iterator last);

        utree&amp; front();
        utree&amp; back();
        utree const&amp; front() const;
        utree const&amp; back() const;

        utree&amp; operator[](std::size_t i);
        utree const&amp; operator[](std::size_t i) const;

        void swap(utree&amp; other);

        iterator begin();
        iterator end();
        const_iterator begin() const;
        const_iterator end() const;

        bool empty() const;
        std::size_t size() const;
    };

    bool operator==(utree const&amp; a, utree const&amp; b);
    bool operator&lt;(utree const&amp; a, utree const&amp; b);
    bool operator!=(utree const&amp; a, utree const&amp; b);
    bool operator&gt;(utree const&amp; a, utree const&amp; b);
    bool operator&lt;=(utree const&amp; a, utree const&amp; b);
    bool operator&gt;=(utree const&amp; a, utree const&amp; b);
</pre>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=sbyo3KJU_zE:TtcZ5EvGYO0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/sbyo3KJU_zE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=s-expressions-and-variants</feedburner:origLink></item>
		<item>
		<title>Integer to String Conversion: Karma fastest again</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/ylFAKvU2uuA/</link>
		<comments>http://boost-spirit.com/home/2010/03/09/integer-to-string-conversion-karma-fastest-again/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 13:24:01 +0000</pubDate>
		<dc:creator>Hartmut Kaiser</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Karma]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1031</guid>
		<description><![CDATA[Tino Didriksin published yet another speed comparison of different ways to convert an integer into a string (see his blog A howl on the Wind&#8230;). And again, Karma turns out to be the leader of the pack by being upto 10 times faster than the other tested methods. This nicely supports our own measurements (see here). Thanks [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (2 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>Tino Didriksin published yet another speed comparison of different ways to convert an integer into a string (see his blog <a title="A howl on the Wind..." href="http://tinodidriksen.com/2010/02/07/cpp-convert-int-to-string-speed/">A howl on the Wind&#8230;</a>). And again, <em>Karma</em> turns out to be the leader of the pack by being upto 10 times faster than the other tested methods. This nicely supports our own measurements (see <a href="http://www.boost.org/doc/libs/1_42_0/libs/spirit/doc/html/spirit/karma/performance_measurements/numeric_performance/int_performance.html">here</a>). Thanks Tino!</p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (2 votes cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=ylFAKvU2uuA:uVtx7X7QF8I:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/ylFAKvU2uuA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/03/09/integer-to-string-conversion-karma-fastest-again/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/03/09/integer-to-string-conversion-karma-fastest-again/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=integer-to-string-conversion-karma-fastest-again</feedburner:origLink></item>
		<item>
		<title>Tracking the Input Position While Parsing</title>
		<link>http://feedproxy.google.com/~r/Boost-Spirit/~3/e3ijqo-29jg/</link>
		<comments>http://boost-spirit.com/home/2010/03/05/tracking-the-input-position-while-parsing/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 16:21:53 +0000</pubDate>
		<dc:creator>Peter Schüller</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[Qi Example]]></category>
		<category><![CDATA[MultiPass]]></category>
		<category><![CDATA[Qi]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=1026</guid>
		<description><![CDATA[The following article is about tracking the parsing position with Spirit V2. This is useful for generating error messages which tell the user exactly where an error has occurred. We also show how to use Spirit V2 to parse from an input stream without first reading the whole stream into a std::string. Continue reading » [...]<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>The following article is about tracking the parsing position with <em>Spirit</em> V2. This is useful for generating error messages which tell the user exactly where an error has occurred. We also show how to use <em>Spirit</em> V2 to parse from an input stream without first reading the whole stream into a std::string.</p>
<p><a href="http://boost-spirit.com/home/articles/qi-example/tracking-the-input-position-while-parsing/">Continue reading »</a></p>
<br /><div><img src="http://boost-spirit.com/home/wp-content/plugins/gd-star-rating/gfx.php?value=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (1 vote cast)</div><br /><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Boost-Spirit?a=e3ijqo-29jg:DoNoblc6ySg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Boost-Spirit?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Boost-Spirit/~4/e3ijqo-29jg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/03/05/tracking-the-input-position-while-parsing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://boost-spirit.com/home/2010/03/05/tracking-the-input-position-while-parsing/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=tracking-the-input-position-while-parsing</feedburner:origLink></item>
	</channel>
</rss>
