Re: Negative relational operators for Groovy 3

2016-11-23 Thread Daniel Sun
Hi Guillaume, All features added in the new parser have been synch to parrot branch. I am looking for a better way to report missing the RIGHT parenthesis with less performance reduction ;) Cheers, Daniel.Sun 在 "Guillaume Laforge [via Groovy]" ,2016年11月24日 上午6:14写道: Ooops, a mistake

Re: Negative relational operators for Groovy 3

2016-11-23 Thread Guillaume Laforge
Ooops, a mistake of mine with a missing parens in some code before that. We might have to pay attention to error reporting, and see how good it is to help fix developer's mistakes. On Wed, Nov 23, 2016 at 10:47 PM, Guillaume Laforge wrote: > Is the "parrot" branch covering !in already? > > I fet

Re: Negative relational operators for Groovy 3

2016-11-23 Thread Marc Hadfield
-1 from me on all cases. On Wed, Nov 23, 2016 at 4:47 PM, Guillaume Laforge wrote: > Is the "parrot" branch covering !in already? > > I fetched it today, but got issues with !in > > if (1 !in [0, 1, 2]) {} > > Nov 23, 2016 10:45:29 PM org.apache.groovy.parser.antlr4.AstBuilder > buildAST > SEV

Re: Negative relational operators for Groovy 3

2016-11-23 Thread Guillaume Laforge
Is the "parrot" branch covering !in already? I fetched it today, but got issues with !in if (1 !in [0, 1, 2]) {} Nov 23, 2016 10:45:29 PM org.apache.groovy.parser.antlr4.AstBuilder buildAST SEVERE: Failed to build AST org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed

Re: Negative relational operators for Groovy 3

2016-11-23 Thread Graeme Rocher
-1 from me too, very confusing. +1 for only !in and !instanceof Cheers On Tue, Nov 22, 2016 at 6:46 PM, Jim Jagielski wrote: > Agreed. > >> On Nov 22, 2016, at 6:44 AM, Guillaume Laforge wrote: >> >> I must confess I'm also a bit worried with those operators too. >> For !in and !instanceof, I r

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Jim Jagielski
Agreed. > On Nov 22, 2016, at 6:44 AM, Guillaume Laforge wrote: > > I must confess I'm also a bit worried with those operators too. > For !in and !instanceof, I really like the idea, but here, it's closer to > Ascii art. > What others think? > > On Tue, Nov 22, 2016 at 12:35 PM, Cédric Champea

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Roman Shaposhnik
On Tue, Nov 22, 2016 at 7:11 PM, Henrik Martin wrote: > -1. I never knew I was missing those operators. I think there's a huge > benefit to having a clean syntax. > +1 for !in and !instanceof though. Same here! Thanks, Roman.

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Henrik Martin
-1. I never knew I was missing those operators. I think there's a huge benefit to having a clean syntax. +1 for !in and !instanceof though. -Henrik On 11/22/16 3:44 AM, Guillaume Laforge wrote: I must confess I'm also a bit worried with those operators too. For !in and !instanceof, I really li

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Søren Berg Glasius
: Guillaume Laforge Reply: dev@groovy.apache.org Date: 22. november 2016 at 12.44.25 To: dev@groovy.apache.org Cc: Groovy_Developers Subject: Re: Negative relational operators for Groovy 3 I must confess I'm also a bit worried with those operators too. For !in and !instanceof, I really

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Guillaume Laforge
I must confess I'm also a bit worried with those operators too. For !in and !instanceof, I really like the idea, but here, it's closer to Ascii art. What others think? On Tue, Nov 22, 2016 at 12:35 PM, Cédric Champeau wrote: > I find this very hard to decipher. The fact we wonder about the seman

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Cédric Champeau
I find this very hard to decipher. The fact we wonder about the semantics is a red warning to me. I wouldn't add those to the language. Le 22 nov. 2016 12:18, "Daniel Sun" a écrit : > Hi Jochen, > > According to your proposals, I'm going to add the following operators: > > 1) !&& a !&&

Re: Negative relational operators for Groovy 3

2016-11-22 Thread Daniel Sun
Hi Jochen, According to your proposals, I'm going to add the following operators: 1) !&& a !&& b === !(a && b) 2) !||a !|| b === !(a || b) 3) !& a !& b === !(a & b) 4) !| a !| b === !(a | b) 5) ~& a ~& b === ~(a & b) 6) ~| a ~| b === ~(a | b)

Re: Negative relational operators for Groovy 3

2016-11-19 Thread Daniel Sun
gt; >>> -- >>> View this message in context: >>> http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736816.html >>> Sent from the Groovy Dev mailing list archive at Nabble.com. >> >> >> >> >> _____

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Hi Jochen, > "a !&& b" for a nand instead of "!(a && b)" or instead of "!a || !b" > then there is also ~& and !& Looks good. They've been added to my TODO list :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Hi Jochen, I've modified the implementation according to your suggestions that ONLY support !in and !instanceof with sticky style. In addition, !in and !instanceof are REAL operators now(https://github.com/danielsun1106/groovy-parser/commit/87e2c41763422a6642414028d84efdccb90bfcda) I'll

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
> === and !=== are available for Groovy 3, so "!is" is not necessary. The identity operators should be === and !==:) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736834.html Sent from the

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Paolo Di Tommaso
+1 On Fri, Nov 18, 2016 at 1:58 PM, Jochen Theodorou wrote: > > I think !instanceof and !in are ok. The others... not sure here. Right now > a=b, which means !< is >=. And in this case I > actually prefer >=. > > bye Jochen >

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Guillaume Laforge
Ok, great! On Fri, Nov 18, 2016 at 5:38 PM, Daniel Sun wrote: > Hi Guillaume, > > === and !=== are available for Groovy 3, so "!is" is not necessary. > > Currently only "!in" and "!instanceof" are supported with sticky style: > https://github.com/danielsun1106/groovy-parser/commit/ > 690

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Interesting, haha :) -- View this message in context: http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736831.html Sent from the Groovy Dev mailing list archive at Nabble.com.

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Hi Guillaume, === and !=== are available for Groovy 3, so "!is" is not necessary. Currently only "!in" and "!instanceof" are supported with sticky style: https://github.com/danielsun1106/groovy-parser/commit/69023a63446d14add54f43d3d7797c9dd2a7f903 If it is ok, I'll merge it into par

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Guillaume Laforge
- >> >>> De: "Graeme Rocher" >>> À: dev@groovy.apache.org >>> Cc: d...@groovy.incubator.apache.org >>> Envoyé: Vendredi 18 Novembre 2016 15:16:04 >>> Objet: Re: Negative relational operators for Groovy 3 >>> >> >> In agreement with e

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Jochen Theodorou
On 18.11.2016 15:52, Remi Forax wrote: - Mail original - De: "Graeme Rocher" À: dev@groovy.apache.org Cc: d...@groovy.incubator.apache.org Envoyé: Vendredi 18 Novembre 2016 15:16:04 Objet: Re: Negative relational operators for Groovy 3 In agreement with everyone else

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Jochen Theodorou
On 18.11.2016 14:11, Daniel Sun wrote: Hi Jochen, I think !instanceof and !in are ok. The others... not sure here. Right now a*=b, which means !< is >=. And in this case I actually prefer >=. Sometimes we write code like "!(a > b)", now we can write "a !> b" instead, which is much c

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Andres Almiray
s, >>>>> Daniel.Sun >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> View this message in context: >>>>> >>>>> http://groovy.329449.n5.nabble.com/Negative-relati

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Remi Forax
t;> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> >http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736816.html >>>> Sent from the Groovy D

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Paul King
>> >> >> >> ____________ >> If you reply to this email, your message will be added to the discussion >> below: >> http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736817.html >> To unsubscribe from Negative relational operators for Groovy 3, click here. >> NAML >> >> >> >> View this message in context: Re: Negative relational operators for Groovy 3 >> Sent from the Groovy Dev mailing list archive at Nabble.com. > > > > -- > Graeme Rocher

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Guillaume Laforge
; >> - Mail original - >> > De: "Graeme Rocher" >> > À: dev@groovy.apache.org >> > Cc: d...@groovy.incubator.apache.org >> > Envoyé: Vendredi 18 Novembre 2016 15:16:04 >> > Objet: Re: Negative relational operators for Groovy 3 >>

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Sergei Egorov
> http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736816.html > >>> Sent from the Groovy Dev mailing list archive at Nabble.com. > >> > >> > >> > >> > >> > >> If you reply to this email, your message will be added to the discussion > >> below: > >> > http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736817.html > >> To unsubscribe from Negative relational operators for Groovy 3, click > here. > >> NAML > >> > >> > >> > >> View this message in context: Re: Negative relational operators for > Groovy 3 > >> Sent from the Groovy Dev mailing list archive at Nabble.com. > > > > > > > > -- > > Graeme Rocher >

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Remi Forax
- Mail original - > De: "Graeme Rocher" > À: dev@groovy.apache.org > Cc: d...@groovy.incubator.apache.org > Envoyé: Vendredi 18 Novembre 2016 15:16:04 > Objet: Re: Negative relational operators for Groovy 3 > In agreement with everyone else here. > >

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Graeme Rocher
> If you reply to this email, your message will be added to the discussion > below: > http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809p5736817.html > To unsubscribe from Negative relational operators for Groovy 3, click here. > NAML > > > > View this message in context: Re: Negative relational operators for Groovy 3 > Sent from the Groovy Dev mailing list archive at Nabble.com. -- Graeme Rocher

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
OK. I see :) 在 Cédric Champeau [via Groovy] ,2016年11月18日 下午9:18写道: I agree with Jochen and Guillaume: +1 to !instanceof and !in, but I don't like the other variants. 2016-11-18 14:11 GMT+01:00 Daniel Sun <[hidden email]>: Hi Jochen, > I think !instanceof and !in are ok. The others... not s

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
OK. As most of us just like !in and !instanceof and prefer the sticky style, I will modify them later. Thanks for your review ;) Cheers, Daniel.Sun 在 "Guillaume Laforge [via Groovy]" ,2016年11月18日 下午9:07写道: On Fri, Nov 18, 2016 at 2:05 PM, Guillaume Laforge <[hidden email]> wrote: On Fri, N

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Cédric Champeau
I agree with Jochen and Guillaume: +1 to !instanceof and !in, but I don't like the other variants. 2016-11-18 14:11 GMT+01:00 Daniel Sun : > Hi Jochen, > > > I think !instanceof and !in are ok. The others... not sure here. Right > > now a*=b, which means !< is >=. And in this > > case I actual

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Hi Jochen, > I think !instanceof and !in are ok. The others... not sure here. Right > now a*=b, which means !< is >=. And in this > case I actually prefer >=. Sometimes we write code like "!(a > b)", now we can write "a !> b" instead, which is much close to our mind :) Cheers, Daniel.

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Guillaume Laforge
On Fri, Nov 18, 2016 at 2:05 PM, Guillaume Laforge wrote: > > On Fri, Nov 18, 2016 at 1:58 PM, Jochen Theodorou > wrote: > >> >> >> On 18.11.2016 13:45, Daniel Sun wrote: >> >>> Hi all, >>> >>> The new parser(Parrot) supports negative relational operators now, >>> which is proposed by Guil

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Guillaume Laforge
On Fri, Nov 18, 2016 at 1:58 PM, Jochen Theodorou wrote: > > > On 18.11.2016 13:45, Daniel Sun wrote: > >> Hi all, >> >> The new parser(Parrot) supports negative relational operators now, >> which is proposed by Guillaume Laforge :) >> >> Here are some example >> codes(https://github.

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Daniel Sun
Hi Jochen, > oh... and one question... is "! in" the same as "!in"? Yeah, the negative relational operators are combined operators, which will be transformed to normal NotExpression :) Cheers, Daniel.Sun -- View this message in context: http://groovy.329449.n5.nabble.com/Negative-relatio

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Jochen Theodorou
On 18.11.2016 13:45, Daniel Sun wrote: Hi all, The new parser(Parrot) supports negative relational operators now, which is proposed by Guillaume Laforge :) Here are some example codes(https://github.com/danielsun1106/groovy-parser/blob/negativeRelationalOperators/src/test/resource

Re: Negative relational operators for Groovy 3

2016-11-18 Thread Jochen Theodorou
On 18.11.2016 13:45, Daniel Sun wrote: Hi all, The new parser(Parrot) supports negative relational operators now, which is proposed by Guillaume Laforge :) Here are some example codes(https://github.com/danielsun1106/groovy-parser/blob/negativeRelationalOperators/src/test/resource