as for qdox not being useful for a compiler... all I need is the signatures of the methods and classes. As long as those are available the compiler will be fine. It is not like I want to compile the java part with a handwritten parser ;)

Am 23.06.2015 09:52, schrieb Cédric Champeau:
I second the idea of using a single Java parser everywhere. I wouldn't
bet on QDox since it seems unmaintained. Eventually it would be nice if
we had a grammar that supports both Groovy and Java files, but that's a
lot more work.

2015-06-23 9:50 GMT+02:00 [email protected]
<mailto:[email protected]> <[email protected]
<mailto:[email protected]>>:

    I think QDox is useful for something like GroovyDoc but not a compiler.

    --
    Corneil du Plessis
    https://about.me/corneil

    <https://about.me/corneil?promo=email_sig>


    On 23 June 2015 at 09:26, Guillaume Laforge <[email protected]
    <mailto:[email protected]>> wrote:

        Hi Jochen,

        A few thoughts...

        1) It sounds like a good idea to focus on one single Java
        parser, instead of two.

        2) I think we could get rid (completely) of the useless
        java2groovy usage and tool altogether (one less place to use a
        Java parser)

        3) I'm wondering what is going to be the most up-to-date /
        practical of Antlr v4 vs QDox Java parser?
        Is QDox still alive? (I notice Paul Hammant migrated QDox from
        Codehaus to his Github account)
        And is QDox using the latest Java 8 syntax or is it still on an
        older version of the Java syntax?
        Perhaps the Antlr Java parser would be more up-to-date? (and
        there's usually always someone to contribute a new grammar for
        newer versions of Java)

        Guillaume

        2015-06-23 6:22 GMT+02:00 Jochen Theodorou <[email protected]
        <mailto:[email protected]>>:

            Hi all,

            we do currently use java parsers in 3 places kind of. One is
            through Qdox for GroovyDoc, one is for joint compilation
            through javac and another is the java-to-groovy tool (or did
            we remove that?) which uses an antlrv2 based parser.

            Now in the long term we want to move to antlr4 of course,
            but also I am unhappy with the stub generator based compiler
            we have for joint compilation. And since cooperation tries
            with javac failed I think it is now time to use an
            alternative approach and parse the java files ourselves...
            Especially now, that we have those class file readers
            (special thanks to Peter Gromov).

            Now... there are BSD licenses antlr4 java parser available.
            There is also the yacc based (and java generating) parser
            from qdox. The question would be which one to use.

            Assuming we would use the qdox parser, I would need to make
            modification to be able to use it for joint compilation...
            specifically in the class resolution parts. I am not sure
            this would be still an extension or grow into a fork of qdox.

            Assuming I would use a stripped down antlr4 java parser, the
            question would be if we wanted to replace qdox or keep it. I
            mean if we have our own parser, then it is a small step to
            also analyse the comments with it.

            So what do you guys think?

            bye blackdrag

            --
            Jochen "blackdrag" Theodorou
            blog: http://blackdragsview.blogspot.com/




        --
        Guillaume Laforge
        Groovy Project Manager
        Product Ninja & Advocate at Restlet <http://restlet.com>

        Blog: http://glaforge.appspot.com/
        Social: @glaforge <http://twitter.com/glaforge> / Google+
        <https://plus.google.com/u/0/114130972232398734985/posts>





--
Jochen "blackdrag" Theodorou
blog: http://blackdragsview.blogspot.com/

Reply via email to