[cfe-dev] RFC: Adding a rename refactoring tool to clang
Richard
legalize at xmission.com
Fri Aug 1 16:01:01 PDT 2014
In article <CAAiZkiANTEcWTBY2LkRPxyB7=ajjGy81x-zJToUC=sxtOX5cmQ at mail.gmail.com>,
Gabriel Dos Reis <gdr at integrable-solutions.net> writes:
> On Wed, Jul 30, 2014 at 9:42 AM, Richard <legalize at xmission.com> wrote:
>
> > As far as C++ refactoring tools goes, *anything* based on clang's
> > parser is going to be light years ahead of other tools that are based
> > on ad-hoc homegrown parsers.
>
>
> not to be argumentative, but in what ways is Clang's parser not ad-hoc and
> homegrown? How many C++ parsers aren't in that category?
Allow me to clarify my terminology:
"ad hoc" and heuristic based parsers are things that are based on
pattern matching, searching for matching names, etc., without actually
building any representation of the language. Clang's parser is (as I
understand it) a hand-written recursive descent parser that builds a
model of the source text that represents the syntactical constructs
present in the language. It may be "ad hoc" in the sense that it is
a hand-written parser and not generated using a compiler generator
like YACC, but it isn't "ad hoc" in the sense I was using above.
In the sense I'm using "ad hoc" parser, such parsers fail to properly
parse valid source text. Unless clang's C++11 support is vastly
over-advertised, I don't think you can say it falls into that
category.
> JetBeans has been promising:
> http://www.jetbrains.com/resharper/features/cpp.html
Ah, that's the link I've been looking for... I didn't know they were
going to bundle that with ReSharper; I thought it was going to be part
of their AppCode product.
I've been wanting to try this and I've been hearing good things about
it. But, you know what? It wouldn't surprise me at all if it was
built on top of clang :-).
I know if *I* were going to try and make a commercial refactoring tool
for C++ as a VS plug-in, that's where I'd start.
I'm going to email JetBrains and ask for access to this. If anyone
can make a kick-ass add-on for VS that "just works" it will be them.
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <http://ComputerGraphicsMuseum.org>
The Terminals Wiki <http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <http://LegalizeAdulthood.wordpress.com>
More information about the cfe-dev
mailing list