[GEP] Refine parsing negative numbers

2018-02-22 Thread Daniel Sun
Hi all, Groovy parses negative numbers as unary expression. For example, `-1` is parsed as `-``1`, older parser parses negative numbers twice, so does the Parrot parser for the identical output... I suggest to parse negative numbers as REAL numbers instead of unary expression[1].

Re: Loading groovy as a Jigsaw auto-module

2018-02-22 Thread Paul King
After moving the Extensions file, it looks like the only other file in Cédric's list that causes Java 9's ModuleFinder a problem is Groovy's extension module file: META-INF/services/org.codehaus.groovy.runtime.ExtensionModule I'll also see what is involved in moving that (with a fallback to the

Re: [GEP] Refine parsing negative numbers

2018-02-22 Thread Paul King
This and similar issues have come up before. It would be worthwhile searching the mail archives. At least one related change we backed out of last time. I'd be interested to see how it impacts the examples in previous discussions: https://issues.apache.org/jira/browse/GROOVY-7428

Re: [GEP] Refine parsing negative numbers

2018-02-22 Thread Daniel Sun
Hi Paul, Thanks for your finding these discussion. As Jochen said: Ruby and Python calculate `-2**4` and return `-16`, Groovy returns the same value currently. But Scala/Excel returns `16`... Maybe Ruby/Python/Groovy behaves properly for most people... blackdrag

Re: [GEP] Refine parsing negative numbers

2018-02-22 Thread Guillaume Laforge
We have to be careful with such breaking changes, as it could change the results of existing calculations. The other aspect being the fact that the AST would be different, so it might have a small impact on some AST transformations that would look at such constant numbers. On Thu, Feb 22, 2018 at

Re: [GEP] Refine parsing negative numbers

2018-02-22 Thread Daniel.Sun
OK. I see ;-) -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

[RESULT][VOTE] Release Groovy 2.5.0-beta-3

2018-02-22 Thread Paul King
Thanks everyone for voting. The vote has passed with five +1 votes from PMC members and two additional +1 votes. I'll proceed with next steps. Cheers, Paul. On Wed, Feb 21, 2018 at 11:58 PM, Jochen Theodorou wrote: > +1 > > Am 21.02.2018 um 14:56 schrieb John Wagenleitner:

Re: Loading groovy as a Jigsaw auto-module

2018-02-22 Thread Jochen Theodorou
Hi, Everything in META-INF/service has to move, unless it is following the SPI structure. But just us moving will not allow Groovy libraries to define extension methods sadly. Am 22.02.2018 um 10:56 schrieb Paul King: After moving the Extensions file, it looks like the only other file in