groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <>
Subject Re: More Antlr4-based Groovy parser status update
Date Mon, 29 Feb 2016 10:39:43 GMT

On 28.02.2016 12:55, Jesper Steen Møller wrote:
>   * Memory: Is this an issue I should be focusing on — and is there a
>     test to baseline against?

no test you can baseline against imho. The current approach is keeping 
everything in memory and uses that for the cst part, which is build in 
the parsing phase of the compiler. The conversion to an AST is done in 
the next step, the conversion step.

I my opinion the cst and the getter for the cst should be deprecated... 
but this may require some changes in the compiler and its 
infrastructure... so in total, the tree approach might be easier for now.

>   * I’ve discovered a small issue with unary syntax. Currently, nested
>     unary expressions are not supported without parenthesis: Try e.g. -
>     -1 or + -1. Is this intentional, or just an artifact of the
>     precedence-refactored Java grammar?

you mean "- -1" as in -(-1)? I think there was a grammar reason for 
this. If it there is no trouble with this in the new grammar, then you 
can support it, np.. I see that as an optional

bye Jochen

View raw message