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

Parser error when Map key contains period in JSR mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-10
    • 1.0-JSR-4
    • parser-antlr2
    • None
    • Windows XP, JVM 1.4.2_07, groovy 1.0-beta-10 in JSR mode

    Description

      The printMapParserError method displays this bug when in JSR mode. When the key property of a map contains a period the parser displays the error:

      "Caught: General error during parsing: unexpected token: :"

      class MapTester {

      def key = "id"

      void printMap()

      { myMap = [key:1234] println myMap }

      void printMapParserError()

      { myMap = [this.key:1234] println myMap }

      static void main(String[] args)

      { new MapTester.printMap() new MapTester.printMapParserError() }

      }

      Attachments

        1. MapKeySyntaxTest.groovy
          0.8 kB
          Kim, Pilho

        Issue Links

          Activity

            People

              jrose Jon Rose
              ahoward Adam Howard
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: