tunnelvisionlabs / antlr4

The highly-optimized fork of ANTLR 4 (see README)
Other
73 stars 13 forks source link

[antlr4.6]Failed to generate parser after upgraded to 4.6 from 4.5.3 #13

Closed daniellansun closed 7 years ago

daniellansun commented 7 years ago

Hi Sam(@sharwell),

After I upgraded the optimized version of antlr4 to 4.6, groovy parser can not be generated. Could you please take a look at the broken changing issue? Thanks in advance!

Here are steps to reproduce: 1) git clone -b antlr4_6 https://github.com/danielsun1106/groovy-parser.git 2) cd groovy-parser 3) ./gradlew antlr4

Error messages: https://travis-ci.org/danielsun1106/groovy-parser/builds/188067699

error(75): GroovyParser.g4:6:11: label 'left=variableNames' type mismatch with previous definition: left=expression
error(75): GroovyParser.g4:9:85: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:10:141: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:11:118: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:20:18: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:21:209: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:28:18: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:29:131: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:30:94: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:31:91: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:32:93: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:33:91: label 'right=expression' type mismatch with previous definition: right=statementExpression
error(75): GroovyParser.g4:34:90: label 'right=expression' type mismatch with previous definition: right=statementExpression
sharwell commented 7 years ago

😦 This is a known regression in ANTLR 4.6 that carried over into my fork. When I tried to make sure that fixes from 4.6.1 were brought over, I forgot that it was not yet resolved. See antlr/antlr4#1543.

daniellansun commented 7 years ago

OK. I see. Looking forward to the next release ;)

sharwell commented 7 years ago

Fixed in antlr/antlr4#1570 and merged to optimized fork in cb98125b134fe7f13501c573eec97941f57b7ba7. Will publish with 4.6.0.1-opt tonight.