<div dir="ltr"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">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?</blockquote>
<div> </div><div>I think the intended distinction is that ad-hoc parsers try to discard as much information that is unrelated to the task at hand as possible. </div><div>For example, one could imagine an ad-hoc parser intended for indenting that simply determined how many unmatched curly braces there are. </div>
<div><br></div><div>As far as I can tell, ad-hoc, when applied to parses, is synonymous with "bad"</div><div class="im" style="font-family:arial,sans-serif;font-size:13px"></div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On Fri, Aug 1, 2014 at 1:22 PM, Gabriel Dos Reis <span dir="ltr"><<a href="mailto:gdr@integrable-solutions.net" target="_blank">gdr@integrable-solutions.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Wed, Jul 30, 2014 at 9:42 AM, Richard <span dir="ltr"><<a href="mailto:legalize@xmission.com" target="_blank">legalize@xmission.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In article <<a href="mailto:CAMfx8%2BeLTwdAbHw64L-O71hChrsKJKBOsgB-cuYaXN4xU7Qp5Q@mail.gmail.com" target="_blank">CAMfx8+eLTwdAbHw64L-O71hChrsKJKBOsgB-cuYaXN4xU7Qp5Q@mail.gmail.com</a>>,<br>
<div> Matthew Plant <<a href="mailto:mplant@google.com" target="_blank">mplant@google.com</a>> writes:<br>
<br>
> The code does not need to be compile-able, but it does need to be at least<br>
> some-what parseable.<br>
<br>
</div>In this regard, clang's rename won't be any worse than any other<br>
language's rename.<br>
<br>
For instance, refactoring tools are pretty mature in .NET/Java, but<br>
none of them successfully rename an identifier whose type can't be parsed.<br>
You're fundamentally missing the semantic information needed to decide<br>
where else this identifier needs to be changed.<br>
<br>
As far as C++ refactoring tools goes, *anything* based on clang's<br>
parser is going to be light years ahead of other tools that are based<br>
on ad-hoc homegrown parsers. </blockquote><div><br></div></div><div>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?</div><div class="">
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> I've been kicking the tires of C++<br>
refactoring tools since roughly 2007 when I started refactoring a crusty<br>
old code base. Obviously the older tools use their own parser. Just<br>
having a parser that gets the job done correctly is difficult, never<br>
mind keeping that parser up to date with the C++11 and C++14<br>
standards.<br>
<br>
This is where clang-based refactoring tools are really going to shine.<br>
Leveraging the *production quality* parser and resulting lossless AST<br>
just puts you miles ahead in the game.<br>
<div><br></div></blockquote><div><br></div></div><div>JetBeans has been promising: <a href="http://www.jetbrains.com/resharper/features/cpp.html" target="_blank">http://www.jetbrains.com/resharper/features/cpp.html</a></div>
<div>It would be interesting to see the two of you sort it out on that kind of field :-)</div>
<div><br></div><div>-- Gaby</div></div></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>