groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (GROOVY-8171) Escaped dollar slashy difference between old and parrot parsers
Date Thu, 26 Jul 2018 04:47:01 GMT

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

Paul King closed GROOVY-8171.
-----------------------------

> 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
>            Assignee: John Wagenleitner
>            Priority: Minor
>             Fix For: 2.6.0-alpha-4, 3.0.0-alpha-3
>
>
> 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)

Mime
View raw message