Groovy
  1. Groovy
  2. GROOVY-675

multiple backslashes and backslash plus dollarsign are not correctly interpreted

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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

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

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development