[bitc-dev] why the switch to c++?

Gergely Buday gbuday at gmail.com
Thu Feb 12 05:48:32 EST 2009


2009/2/12 David-Sarah Hopwood <david.hopwood at industrial-designers.co.uk>:

>> The main things that we need in order to self-host the BitC compiler are:
>>
>> 1. An interface module for the libicu components that we rely on.
>> 2. A parser generator that can handle actions written in BitC.
>> 3. A final choice of surface syntax.
>> 4. An AST compiler similar to ASTmaker that emits BitC code.
>
> For 2 and 4, I thoroughly recommend ANTLR (version 3.1, which supports
> tree->tree rewriting grammars). It is BSD-licensed. The reference manual is
> <http://www.pragprog.com/titles/tpantlr/the-definitive-antlr-reference>.

It does have an ML version, shipped with the SML/NJ compiler. I have
the bias that having algebraic datatypes make your life easier when
handling abstract syntax trees.

- Gergely


More information about the bitc-dev mailing list