[cfe-dev] clang leveraging Elsa?

Benjamin Meyer ben at meyerhome.net
Wed Oct 3 12:49:06 PDT 2007

On Oct 3, 2007, at 8:42 PM, Chris Lattner wrote:

> On Oct 1, 2007, at 1:00 PM, Taras Glek wrote:
>> Elsa is further along in development (fairly complete in that it can
>> parse most of the C/C++ code that gcc3.4 accepts). Have the clang
>> developers considered reusing parts of the elsa? I haven't noticed a
>> mention of elsa in the list archives.
> We have.  The killer problem is that Elsa's implementation will not
> allow us to achieve the performance goals of the clang project.  In
> addition, Elsa doesn't solve the hard part of C++ parsing (the
> semantic analysis and type checking), isn't built as a reusable
> library (in the way clang aims to be), doesn't get the corner cases
> of the languages it parses correct, etc.
> While we could extend Elsa to complete its support for C++ and polish
> the corner cases, fixing the performance issues would require a
> complete redesign.  As such, reusing elsa is a non-starter. :(
>> Elsa comes with an extensive testsuite and has some design
>> similarities
>> to clang as described in the clang Internals manual.
> When we get that far, I expect clang to extensively leverage the
> available test suites, including the GCC test suite, elsa, as well as
> just building tons of open source software.
>> I am very interested in clang since it will be a C/C++/ObjC frontend
>> that's suitable for source analysis that also serves as a frontend
>> to a
>> production compiler.
>> My biggest gripe with Elsa is that isn't developed in a transparent
>> fashion. It  also occasionally has bugs that would be caught if it
>> were
>> used as a frontend for a compiler.
> clang is definitely developed in the open and welcomes contributors.
> However, our C++ support is basically non-existent (and we don't have
> anyone really working on it), so Elsa is probably a better solution
> to C++ parsing issues in the short term.  Over the next couple years,
> I expect the clang C++ support to come up to the point where it is
> both industrial quality and useful for a broad variety of clients.
> It also has much better ObjC support than elsa ;-)
> -Chris

The past few months I have been writing many tools with Roberto  
Raggi's c++ preprocessor and parser.  It is very fast and I have  
enjoyed messing with it.  As you (chris) already know exactly what  
you guys need/want and what would make a good parser I am very  
curious what you can say about it  (where it is good/bad, what it is  
missing etc)

The one I have been using can be found in this package:


Located in: generator/parser/ and the preprocessor is in generator/ 

-Benjamin Meyer

More information about the cfe-dev mailing list