Addin exceptions in SvStream
Marc-André Laverdière
marcandre.laverdiere at gmail.com
Sat Dec 22 03:53:50 PST 2012
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 at 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 at suse.cz
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
More information about the LibreOffice
mailing list