@Michael. I am studying in a software reegineering lab - I do have a
small clue ;) We had a Masters' student who implemented his own C
grammar. 3 months of work for one bullet in one slide. No fun.
I know that C++ is an horrible monster to parse. My question was why
pick a tool over another.
Maybe the JavaCC or Antlr grammars are not very good. Maybe the
Phoenix framework doesn't work for some variants of C++ we care about.
Maybe GCC has an horrible API. Maybe nobody feels like asking for a
license for the Bauhaus framework.
You can tell I've done a lot of guessing in the last paragraph :D
Since I am in such a lab, and someone will sooner or later want an
improved C/C++ analysis tool, I'd like to give the best suggestion.
@Lubos. I started writing a plug-in. I have a problem with compiling,
however. It somehow doesn't find the headers on my system.
This is the autogen.sh I use (I tried with and without --includedir,
and --includedir=/usr/)
./autogen.sh CC=clang CXX=clang++ --includedir=/usr/include/
--enable-compiler-plugins
I get this in the output:
checking clang/AST/RecursiveASTVisitor.h usability... no
checking clang/AST/RecursiveASTVisitor.h presence... no
checking for clang/AST/RecursiveASTVisitor.h... no
configure: error: Cannot find Clang headers to build compiler plugins.
Yet...
$ ls /usr/include/clang/AST/RecursiveASTVisitor.h
/usr/include/clang/AST/RecursiveASTVisitor.h
I am on Linux Mint 14. Any clue what is going on?
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
On Sat, Dec 22, 2012 at 10:43 PM, Michael Stahl <mstahl@redhat.com> wrote:
On 22/12/12 12:53, Marc-André Laverdière wrote:
Tell me, why Clang then? Is it because the JavaCC or Antlr grammars
weren't good enough?
uhm... have you ever tried to write a C++ parser? reinventing that
wheel takes man-years (or perhaps man-decades) of effort to get right...
this and the fact that for the longest time C++ frontends were tightly
coupled to compiler internals is the main reason why there are ~no
working C++ refactoring tools today, and hopefully LLVM and/or GCC's
plugin interfaces will fix that some time.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.