groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <>
Subject [GEP] Refine parsing negative numbers
Date Thu, 22 Feb 2018 08:29:46 GMT
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]. It will break the edge case, for example: `-1(a, b, c)` is
parsed as `-(, b, c))`, after refining, `-1(a, b, c)` is parsed as
`, b, c)`.

       Any thoughts?  If no PMC votes -1 on this GEP in 72 hours, I will
work on it.



Sent from:

View raw message