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]" <ml-node+[hidden email]>,2016年11月24日 上午6:14写道:

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 <[hidden email]> 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
SEVERE: Failed to build AST
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
ConsoleScript17: 11: Unexpected input: 'if'; Expecting RPAREN @ line 11, column 1.
   if (1 !in [0, 1, 2]) {}
   ^

1 error

And

assert 3 !in []

Nov 23, 2016 10:45:50 PM org.apache.groovy.parser.antlr4.AstBuilder buildAST
SEVERE: Failed to build AST
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
ConsoleScript18: 9: Unexpected input: 'assert'; Expecting RPAREN @ line 9, column 1.
   assert 3 !in []
   ^

1 error

I did build with -PuseAntlr4=true though.

Guillaume


On Fri, Nov 18, 2016 at 1:45 PM, Daniel Sun <[hidden email]> 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/resources/core/NegativeRelationalOperators_01x.groovy):

assert 'a' instanceof String
assert 'a' !instanceof Integer
assert 1 <= 2
assert 2 !<= 1
assert 2 >= 1
assert 1 !>= 2
assert 1 < 2
assert 2 !< 1
assert 2 > 1
assert 1 !> 2
assert 1 in [1, 2]
assert 3 !in [1, 2]

      The static compilation example codes can be found at
https://github.com/danielsun1106/groovy-parser/blob/negativeRelationalOperators/src/test/resources/core/NegativeRelationalOperators_02x.groovy

       Any thoughts?

Cheers,
Daniel.Sun



--
View this message in context: http://groovy.329449.n5.nabble.com/Negative-relational-operators-for-Groovy-3-tp5736809.html
Sent from the Groovy Dev mailing list archive at Nabble.com.



--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform




--
Guillaume Laforge
Apache Groovy committer & PMC Vice-President
Developer Advocate @ Google Cloud Platform




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-tp5736809p5736964.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.