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

multiple backslashes and backslash plus dollarsign are not correctly interpreted

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-8
    • Fix Version/s: 1.0-beta-10
    • Component/s: ast builder, lexer, parser
    • Labels:
      None

      Description

      the folowing lines are failing

      assert "\\$"=="
      "+"$"
      assert "\\\\"=="\\"+"
      "

      but the following are not

      assert "
      $"=="$"
      assert "\\\\"=="
      "
      assert "\\\\\\"=="\\"+"
      "
      assert "\\\\\\\\"=="\\"+"
      "
      assert "\\\\\\\\\\"=="\\""\\""
      "
      assert "\\\\\\\\\\\\"=="\\""\\""
      "

      2 backslashes are reduced to just one backslash, and the dollar sign seems to "consume" the leading backslash

        Attachments

        1. Groovy675_Bug.groovy
          1.0 kB
          Kim, Pilho
        2. changes.txt
          5 kB
          Kim, Pilho
        3. GROOVY675Test.groovy
          0.9 kB
          Kim, Pilho
        4. StringLexer.diff.txt
          2 kB
          Kim, Pilho

          Activity

            People

            • Assignee:
              jstrachan james strachan
              Reporter:
              blackdrag Jochen Theodorou
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: