<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Boost.Spirit &#187; Build a Compiler</title>
	<atom:link href="http://boost-spirit.com/home/category/build-a-compiler/feed/" rel="self" type="application/rss+xml" />
	<link>http://boost-spirit.com/home</link>
	<description>Home of The Boost.Spirit Library</description>
	<lastBuildDate>Mon, 02 Apr 2012 22:49:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>A Framework for RAD Spirit</title>
		<link>http://boost-spirit.com/home/2010/05/11/a-framework-for-rad-spirit/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=a-framework-for-rad-spirit</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=4.0" /></div><div>Rating: 4.0/<strong>5</strong> (3 votes 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=4.0" /></div><div>Rating: 4.0/<strong>5</strong> (3 votes cast)</div><br />]]></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>
		</item>
		<item>
		<title>Next Week is BoostCon Week!</title>
		<link>http://boost-spirit.com/home/2010/05/08/next-week-is-boostcon-week/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=next-week-is-boostcon-week</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=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (2 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=5.0" /></div><div>Rating: 5.0/<strong>5</strong> (2 votes cast)</div><br />]]></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>
		</item>
		<item>
		<title>S-expressions and variant</title>
		<link>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=s-expressions-and-variants</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=4.0" /></div><div>Rating: 4.0/<strong>5</strong> (3 votes 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; title: ; notranslate">
(* 2 (+ 3 4))
</pre>
<p>The sexp above corresponds to this infix expression:</p>
<pre class="brush: cpp; title: ; notranslate">
(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; title: ; notranslate">
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; title: ; notranslate">

    ///////////////////////////////////////////////////////////////////////////
    // 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=4.0" /></div><div>Rating: 4.0/<strong>5</strong> (3 votes cast)</div><br />]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/03/11/s-expressions-and-variants/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Build a Compiler, What to Build?</title>
		<link>http://boost-spirit.com/home/2010/01/02/build-a-compiler-what-to-build/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-compiler-what-to-build</link>
		<comments>http://boost-spirit.com/home/2010/01/02/build-a-compiler-what-to-build/#comments</comments>
		<pubDate>Sat, 02 Jan 2010 17:47:28 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Build a Compiler]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=828</guid>
		<description><![CDATA[Thank you all for your warm feedback on the “Build a Compiler” post. It seems this has become very popular indeed. I guess it’s time to start. Your overwhelming feedback and comments is enough motivation to carry on with the article series. In general, an imperative OO language seems to be the way to go. [...]<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>Thank you all for your warm feedback on the <a href="http://boost-spirit.com/home/2009/12/02/build-a-compiler/">“Build a Compiler”</a> post. It seems this has become very popular indeed. I guess it’s time to start. Your overwhelming feedback and comments is enough motivation to carry on with the article series.</p>
<p>In general, an imperative OO language seems to be the way to go. It’s not surprising that C++ is very popular. People want a C++ parser! Barring that, due to complexity, a subset or a sanitized/re-syntaxed C++ (e.g. SPECS) is also a popular request. Go is also quite popular. That language indeed looks good and modern. FP, especially LISP/Scheme and even Haskell(!) is also quite popular. And hey: Javascript! and Python! Life would not be complete without these fun languages:-).<br />
<span id="more-828"></span><br />
Here’s a tally of languages suggested for the project sorted by popularity:</p>
<p>I’ll need some time to think about all these. In the meantime, it’s still not too late to chime in with your comments. This particular post will be dynamic. I will add on it over time based on my thoughts and your feedback.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="104">C++</td>
<td width="64">4</td>
</tr>
<tr>
<td>Lisp/Scheme</td>
<td>4</td>
</tr>
<tr>
<td>C</td>
<td>3</td>
</tr>
<tr>
<td>Go</td>
<td>3</td>
</tr>
<tr>
<td>Haskell</td>
<td>3</td>
</tr>
<tr>
<td>C++ SPECS</td>
<td>2</td>
</tr>
<tr>
<td>Javascript</td>
<td>2</td>
</tr>
<tr>
<td>Python</td>
<td>2</td>
</tr>
<tr>
<td>ALGOL-like</td>
<td>1</td>
</tr>
<tr>
<td>C++ Subset</td>
<td>1</td>
</tr>
<tr>
<td>Chapel</td>
<td>1</td>
</tr>
<tr>
<td>Clojure</td>
<td>1</td>
</tr>
<tr>
<td>EBNF</td>
<td>1</td>
</tr>
<tr>
<td>GIMPLE</td>
<td>1</td>
</tr>
<tr>
<td>Forth</td>
<td>1</td>
</tr>
<tr>
<td>Java</td>
<td>1</td>
</tr>
<tr>
<td>Kaleidoscope</td>
<td>1</td>
</tr>
<tr>
<td>Lua</td>
<td>1</td>
</tr>
<tr>
<td>OCC</td>
<td>1</td>
</tr>
<tr>
<td>Pascal</td>
<td>1</td>
</tr>
<tr>
<td>Perl</td>
<td>1</td>
</tr>
<tr>
<td>R</td>
<td>1</td>
</tr>
<tr>
<td>SML</td>
<td>1</td>
</tr>
<tr>
<td>Scala</td>
<td>1</td>
</tr>
<tr>
<td>TinyC</td>
<td>1</td>
</tr>
<tr>
<td>VB</td>
<td>1</td>
</tr>
</tbody>
</table>
<h6>Requirements:</h6>
<p>Here are the requirements thus far:</p>
<ol>
<li>It will be a statically typed, imperative language of the ALGOL/Pascal/C++ family.</li>
<li>It shall be embeddable in your application.</li>
<li>Seamless integration with C++ will be provided with full round-trip calls to and from C++.</li>
<li>There will be zero runtime overhead and zero requirements/dependencies apart from the C++ standard lib and the LLVM back-end.</li>
<li>It shall target LLVM with its JITC support.</li>
<li>It shall be a practical tool, not a toy for instructional purposes only.</li>
</ol>
<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 />]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2010/01/02/build-a-compiler-what-to-build/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Build a Compiler</title>
		<link>http://boost-spirit.com/home/2009/12/02/build-a-compiler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=build-a-compiler</link>
		<comments>http://boost-spirit.com/home/2009/12/02/build-a-compiler/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 08:07:55 +0000</pubDate>
		<dc:creator>Joel de Guzman</dc:creator>
				<category><![CDATA[Build a Compiler]]></category>

		<guid isPermaLink="false">http://boost-spirit.com/home/?p=653</guid>
		<description><![CDATA[I am considering writing a series of articles on compiler development using Spirit-2. It will be based on the series of BoostCon talks from 07 to 09. From the humblest calculator to a full blown programming language. Details are still sketchy at this point. All I can ascertain is that the final language shall use [...]<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> (7 votes cast)</div><br />]]></description>
			<content:encoded><![CDATA[<p>I am considering writing a series of articles on compiler development using Spirit-2. It will be based on the series of BoostCon talks from 07 to 09. From the humblest calculator to a full blown programming language. Details are still sketchy at this point. All I can ascertain is that the final language shall use LLVM as a back-end. There are lots of questions I need to ask in order to get the bases covered. I&#8217;d like to solicit feedback and comments. Will it be an imperative language like C or a functional language like Scheme? I love the line oriented syntax of Python, but is a free format syntax with the all too familiar braces or begin/end blocks be better? Will it be statically typed like C++ or dynamically typed like Python or LISP? Will it be OOP? How complex or simple should it be? Remember, this is meant for instruction. Is a toy language good enough? How about basing it on a simple ISO-standard language like Pascal? Or fun languages like Javascript? How about features? Type inference? Lambda? Operator overloading? Etc., etc., etc.</p>
<p>Let me know what you think&#8230;</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> (7 votes cast)</div><br />]]></content:encoded>
			<wfw:commentRss>http://boost-spirit.com/home/2009/12/02/build-a-compiler/feed/</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
	</channel>
</rss>

