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

multiple backslashes and backslash plus dollarsign are not correctly interpreted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-8
    • 1.0-beta-10
    • ast builder, lexer, parser
    • 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. 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

          People

            jstrachan James Strachan
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: