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

expecting anything but ''\n''; got it anyway

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Cannot Reproduce
    • 1.0-JSR-2
    • 1.0-JSR-2
    • parser, parser-antlr2
    • None

    Description

      The attached program fails with current CVS head – which is JSR-2. It did work with JSR-1 on Windows and produced an eternal loop on Linux when loading the template text from file.

      Here is the console output:

      Exception in thread "main" General error during parsing: expecting anything but ''\n''; got it anyway

      [...]

      Caused by: Script1.groovy:1:86: expecting anything but ''\n''; got it anyway
      at org.codehaus.groovy.antlr.parser.GroovyLexer$1.nextToken(GroovyLexer.java:225)
      at groovyjarjarantlr.TokenBuffer.fill(TokenBuffer.java:69)
      at groovyjarjarantlr.TokenBuffer.LA(TokenBuffer.java:80)
      at groovyjarjarantlr.LLkParser.LA(LLkParser.java:52)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.balancedTokens(GroovyRecognizer.java:2658)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.balancedBrackets(GroovyRecognizer.java:11989)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.argumentLabelStart(GroovyRecognizer.java:11778)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.argument(GroovyRecognizer.java:11591)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.argList(GroovyRecognizer.java:5453)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.methodCallArgs(GroovyRecognizer.java:9525)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.pathElement(GroovyRecognizer.java:9248)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.pathExpression(GroovyRecognizer.java:8896)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.postfixExpression(GroovyRecognizer.java:11072)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.unaryExpressionNotPlusMinus(GroovyRecognizer.java:10933)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.powerExpression(GroovyRecognizer.java:10773)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.multiplicativeExpression(GroovyRecognizer.java:10705)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.additiveExpression(GroovyRecognizer.java:10373)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.shiftExpression(GroovyRecognizer.java:8094)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.relationalExpression(GroovyRecognizer.java:10109)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.equalityExpression(GroovyRecognizer.java:10049)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.regexExpression(GroovyRecognizer.java:9997)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.andExpression(GroovyRecognizer.java:9965)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.exclusiveOrExpression(GroovyRecognizer.java:9933)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.inclusiveOrExpression(GroovyRecognizer.java:9901)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.logicalAndExpression(GroovyRecognizer.java:9869)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.logicalOrExpression(GroovyRecognizer.java:9837)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.conditionalExpression(GroovyRecognizer.java:3854)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.assignmentExpression(GroovyRecognizer.java:8656)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.expression(GroovyRecognizer.java:6359)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.expressionStatement(GroovyRecognizer.java:7147)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.statement(GroovyRecognizer.java:1048)
      at org.codehaus.groovy.antlr.parser.GroovyRecognizer.compilationUnit(GroovyRecognizer.java:557)
      at org.codehaus.groovy.antlr.AntlrParserPlugin.parseCST(AntlrParserPlugin.java:79)
      ... 13 more

      Attachments

        1. oom.template
          0.4 kB
          sormuras
        2. Templating.java
          2 kB
          sormuras
        3. Templating.java
          2 kB
          sormuras
        4. test.template
          0.2 kB
          sormuras

        Issue Links

          Activity

            People

              sormuras sormuras
              sormuras sormuras
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: