Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8171

Escaped dollar slashy difference between old and parrot parsers

    XMLWordPrintableJSON

Details

    Description

      The following test passes with the legacy parser but fails with Parrot

      // legacy parser
      def s1 = $/this $$/ is an escaped dollar forward slash/$
      assert s1 == 'this $/ is an escaped dollar forward slash'
      
      // antlr4 enabled (parrot)
      assert s1 == 'this $/ is an escaped dollar forward slash'
             |  |
             |  false
             this / is an escaped dollar forward slash
      

      Noticed this when I inadvertently changed a spec test in commit 0fb89906aa. When testing for an escaped dollar slash the test had to be changed (commit 942cf4eb3e) to pass using the Antlr4 parser.

      Based on the dollar slashy docs I am not sure if the old behavior is correct or not.

      Attachments

        Activity

          People

            jwagenleitner John Wagenleitner
            jwagenleitner John Wagenleitner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: