[jira] [Commented] (GROOVY-9225) Parser error on certain map keys
[ https://issues.apache.org/jira/browse/GROOVY-9225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907907#comment-16907907 ] Søren Markert commented on GROOVY-9225: --- "Ahaaa" :P > Parser error on certain map keys > > > Key: GROOVY-9225 > URL: https://issues.apache.org/jira/browse/GROOVY-9225 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk >Affects Versions: 2.5.8 >Reporter: Søren Markert >Priority: Critical > > The groovy parser fails on certain keys in associative arrays, but no on > others. > A working example: > {code} > def x = [01: "hey"] > {code} > This example fails: > {code} > def x = [09: "hey"] > {code} > With the message: > {noformat} > groovysh_parse: 2: unexpected token: 9 @ line 2, column 11. >def x = [09: "q"] > ^ > {noformat} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (GROOVY-9225) Parser error on certain map keys
[ https://issues.apache.org/jira/browse/GROOVY-9225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907285#comment-16907285 ] Daniel Sun commented on GROOVY-9225: If number starts with {{0}}, it means a octal number. 00~07 are valid octal numbers, while 08 and 09 in your examples are invalid octal numbers. If you try Groovy 3.0.0-beta-3, the new Parrot parser will give you more friendly prompt: {code:java} def x = [08: "hey"] // yields: Invalid octal number @ line 1, column 10 at line: 1, column: 10 {code} > Parser error on certain map keys > > > Key: GROOVY-9225 > URL: https://issues.apache.org/jira/browse/GROOVY-9225 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk >Affects Versions: 2.5.8 >Reporter: Søren Markert >Priority: Critical > > The groovy parser fails on certain keys in associative arrays, but no on > others. > A working example: > {code} > def x = [01: "hey"] > {code} > This example fails: > {code} > def x = [09: "hey"] > {code} > With the message: > {noformat} > groovysh_parse: 2: unexpected token: 9 @ line 2, column 11. >def x = [09: "q"] > ^ > {noformat} -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (GROOVY-9225) Parser error on certain map keys
[ https://issues.apache.org/jira/browse/GROOVY-9225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16907213#comment-16907213 ] Peter Andersen commented on GROOVY-9225: the same goes for: {code:groovy} def x = [08: "hey"] {code} > Parser error on certain map keys > > > Key: GROOVY-9225 > URL: https://issues.apache.org/jira/browse/GROOVY-9225 > Project: Groovy > Issue Type: Bug > Components: groovy-jdk >Affects Versions: 2.5.8 >Reporter: Søren Markert >Priority: Critical > > The groovy parser fails on certain keys in associative arrays, but no on > others. > A working example: > {code} > def x = [01: "hey"] > {code} > This example fails: > {code} > def x = [09: "hey"] > {code} > With the message: > {noformat} > groovysh_parse: 2: unexpected token: 9 @ line 2, column 11. >def x = [09: "q"] > ^ > {noformat} -- This message was sent by Atlassian JIRA (v7.6.14#76016)