You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "John Wagenleitner (JIRA)" <ji...@apache.org> on 2018/05/19 15:43:00 UTC

[jira] [Updated] (GROOVY-8171) Escaped dollar slashy difference between old and parrot parsers

     [ https://issues.apache.org/jira/browse/GROOVY-8171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Wagenleitner updated GROOVY-8171:
--------------------------------------
    Component/s:     (was: parser-antlr2)
                 parser-antlr4

> Escaped dollar slashy difference between old and parrot parsers
> ---------------------------------------------------------------
>
>                 Key: GROOVY-8171
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8171
>             Project: Groovy
>          Issue Type: Bug
>          Components: parser-antlr4
>    Affects Versions: 2.6.0-alpha-3, 3.0.0-alpha-2
>            Reporter: John Wagenleitner
>            Priority: Minor
>
> The following test passes with the legacy parser but fails with Parrot
> {code}
> // legacy parser
> def s1 = $/this $$/ is an escaped dollar forward slash/$
> assert s1 == 'this $/ is an escaped dollar forward slash'
> {code}
> {code}
> // antlr4 enabled (parrot)
> assert s1 == 'this $/ is an escaped dollar forward slash'
>        |  |
>        |  false
>        this / is an escaped dollar forward slash
> {code}
> Noticed this when I inadvertently changed a spec test in commit [0fb89906aa|https://github.com/apache/groovy/commit/0fb89906aa587920d11fae063bba1d1f8fe26254].  When testing for an escaped dollar slash the test had to be changed ([commit 942cf4eb3e|https://github.com/apache/groovy/commit/942cf4eb3e87f2718df490b9e3547f2042720781]) to pass using the Antlr4 parser.
> Based on the [dollar slashy docs|http://www.groovy-lang.org/syntax.html#_dollar_slashy_string] I am not sure if the old behavior is correct or not.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)