Boost logo

Boost :

From: Chris Lattner (clattner_at_[hidden])
Date: 2007-09-01 20:59:32


On Sep 1, 2007, at 1:11 PM, Andrew Sutton wrote:
>> Clang has the potential to be a top-notch, open-source C++ compiler
>> and tool platform, from which we would all benefit. Let's help Clang
>> get there sooner!
>>
>> Links:
>> Clang: http://clang.llvm.org/
>> LLVM: http://llvm.org/
>> Steve Naroff's talk motivating Clang:
>> - Video: http://llvm.org/devmtg/2007-05/09-Naroff-CFE.mov
>> - Slides: http://llvm.org/devmtg/2007-05/09-Naroff-CFE.pdf
>> Clang announcement: http://lists.cs.uiuc.edu/pipermail/llvmdev/2007-
>> July/009817.html
>
> Cool... I've been wanting something like this for a while. Out of
> curiosity - and this probably isn't the best place to ask - but I
> noticed one of their stated goals is to support source code
> engineering tasks like refactoring, etc. The problem is that
> compilers aren't necessarily that good at that type of work in that
> they require _correct_ and probably preprocessed source code. Is
> there any indication on whether or not this project will support
> partial and incomplete parsing?

I agree with Vladimir: my definition refactoring is as a behavior-
preserving transformation from one valid program to another. Given
this, you really do need much of a compiler, but you also want highly
accurate source location information, information about macro
expansions, etc which compilers typically don't keep. It's an
explicit goal for us to preserve that information and our solutions
seem to work well for us so far.

Other source transformation techniques of various kinds don't need
fully correct ASTs to perform their job. While we haven't done it so
far, I expect our toolkit to grow support for fuzzy parsing (of the
sort that doxygen applies) which can be useful to a wide variety of
clients. One of the nice aspects of our design is that the
decomposition of the front-end into logical pieces allows those
individual pieces to be reused without requiring the whole thing to
be used.

Supporting different parsing techniques in the same framework allows
clients to choose the parsing technique that is most appropriate for
their application. In this way, using our libraries doesn't force
one set of design tradeoffs onto the client.

-Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk