Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Looking at it, it reminds me of JavaCC visitors - I was expecting
something a tad bit more complex.

Since we don't have flow analysis at that level, we may have some
erroneous results, but I'm guessing we'll have accuracy in the 90%
range.

Tell me, why Clang then? Is it because the JavaCC or Antlr grammars
weren't good enough?
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 Mon, Dec 17, 2012 at 7:37 PM, Lubos Lunak <l.lunak@suse.cz> wrote:
On Saturday 15 of December 2012, Marc-André Laverdière wrote:
Sounds to me like a big learning curve is involved - which is going to
be very distracting from research activities.

 Depends. It is something new to learn, but the API is rather intuitive.

If someone can give me link to a good tutorial that gives me a good
feeling about it I may bite.

 I don't think there's anything like that (yet, at least). The Clang tutorials
I could find only say how to create a very basic plugin, which is something
I've already sorted out for LO, so now it is about writing actual code using
Clang internal API (http://clang.llvm.org/doxygen/).

 That said, at this point it should be enough just to give it a try. Under
compilerplugins/clang there are already several plugins, with 2 of them
(lclstaticfix.cxx and postfixincrementfix.cxx) doing code rewriting. Writing
a new one would mean something like looking at what's there, compile a
relevant piece of code with '-Xclang -ast-dump' options to get AST dump to
see how Clang represents it internally, and write a new plugin using the
relevant classes mentioned in the AST dump (and I find it much simpler to
check them out in CLANGDIR/include/clang/AST/ rather than the doxygen
documentation).

 It's not exactly trivial, but it's probably simpler to get than a lot of LO
code. If you decide to give it a try, feel free to ask if you run into
trouble.

--
 Lubos Lunak
 l.lunak@suse.cz
_______________________________________________
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.