You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2017/05/10 22:27:15 UTC

[47/50] [abbrv] groovy git commit: rename antlr4 parser to remove groovy- prefix since that is by convention for modules

rename antlr4 parser to remove groovy- prefix since that is by convention for modules


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/2c01e99f
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2c01e99f
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2c01e99f

Branch: refs/heads/parrot
Commit: 2c01e99f33be6d056ca87220e7ea9fe09ef575d3
Parents: a87e465
Author: paulk <pa...@asert.com.au>
Authored: Mon May 8 10:26:36 2017 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Thu May 11 08:25:33 2017 +1000

----------------------------------------------------------------------
 build.gradle                                    |    2 +-
 settings.gradle                                 |    1 -
 subprojects/groovy-parser-antlr4/README.adoc    |   59 -
 subprojects/groovy-parser-antlr4/build.gradle   |   70 -
 .../apache/groovy/parser/antlr4/GroovyLexer.g4  |  882 ----
 .../apache/groovy/parser/antlr4/GroovyParser.g4 | 1270 ------
 .../parser/antlr4/util/GroovyTestRig.groovy     |   74 -
 .../apache/groovy/parser/AbstractParser.java    |   83 -
 .../org/apache/groovy/parser/Antlr2Parser.java  |   34 -
 .../org/apache/groovy/parser/Antlr4Parser.java  |   39 -
 .../groovy/parser/antlr4/AbstractLexer.java     |   32 -
 .../groovy/parser/antlr4/AbstractParser.java    |   32 -
 .../parser/antlr4/Antlr4ParserPlugin.java       |   45 -
 .../parser/antlr4/Antlr4PluginFactory.java      |   35 -
 .../apache/groovy/parser/antlr4/AstBuilder.java | 4317 ------------------
 .../groovy/parser/antlr4/GroovyLangLexer.java   |   63 -
 .../groovy/parser/antlr4/GroovyLangParser.java  |   38 -
 .../groovy/parser/antlr4/GroovySyntaxError.java |   53 -
 .../groovy/parser/antlr4/GroovydocManager.java  |  183 -
 .../groovy/parser/antlr4/ModifierManager.java   |  198 -
 .../groovy/parser/antlr4/ModifierNode.java      |  164 -
 .../groovy/parser/antlr4/PositionInfo.java      |   73 -
 .../parser/antlr4/SemanticPredicates.java       |  152 -
 .../parser/antlr4/SyntaxErrorReportable.java    |   58 -
 .../TryWithResourcesASTTransformation.java      |  370 --
 .../parser/antlr4/internal/AtnManager.java      |  107 -
 .../internal/DescriptiveErrorStrategy.java      |  110 -
 .../groovy/parser/antlr4/util/StringUtils.java  |  149 -
 .../parser/antlr4/GroovyParserTest.groovy       |  368 --
 .../groovy/parser/antlr4/SyntaxErrorTest.groovy |  181 -
 .../groovy/parser/antlr4/TestUtils.groovy       |  259 --
 .../antlr4/util/ASTComparatorCategory.groovy    |  526 ---
 .../groovy/parser/antlr4/util/AstDumper.groovy  | 1025 -----
 .../test/resources/bugs/BUG-GROOVY-2324.groovy  |   23 -
 .../test/resources/bugs/BUG-GROOVY-4438.groovy  |   26 -
 .../test/resources/bugs/BUG-GROOVY-4757.groovy  |   27 -
 .../test/resources/bugs/BUG-GROOVY-4762.groovy  |   27 -
 .../test/resources/bugs/BUG-GROOVY-5318.groovy  |   19 -
 .../test/resources/bugs/BUG-GROOVY-5652.groovy  |   24 -
 .../test/resources/bugs/BUG-GROOVY-6038.groovy  |   37 -
 .../test/resources/bugs/BUG-GROOVY-8150.groovy  |   21 -
 .../test/resources/bugs/BUG-GROOVY-8161.groovy  |   20 -
 .../src/test/resources/bugs/GROOVY-3898.groovy  |   26 -
 .../core/AnnotationDeclaration_01.groovy        |   57 -
 .../test/resources/core/Annotation_01.groovy    |   19 -
 .../test/resources/core/Annotation_02.groovy    |   20 -
 .../test/resources/core/Annotation_03.groovy    |   21 -
 .../test/resources/core/Annotation_04.groovy    |   20 -
 .../test/resources/core/Annotation_05.groovy    |   19 -
 .../test/resources/core/Annotation_06.groovy    |   20 -
 .../test/resources/core/Annotation_07.groovy    |   20 -
 .../test/resources/core/Annotation_08.groovy    |   28 -
 .../test/resources/core/Annotation_09.groovy    |   32 -
 .../test/resources/core/Annotation_10x.groovy   |   38 -
 .../src/test/resources/core/Array_01x.groovy    |  104 -
 .../src/test/resources/core/Assert_01.groovy    |   46 -
 .../src/test/resources/core/Assert_02x.groovy   |   55 -
 .../src/test/resources/core/Assert_03x.groovy   |   44 -
 .../resources/core/BreakingChange_01x.groovy    |   42 -
 .../resources/core/BreakingChange_02x.groovy    |   27 -
 .../resources/core/BreakingChange_03x.groovy    |   34 -
 .../resources/core/BreakingChange_04x.groovy    |   44 -
 .../resources/core/ClassDeclaration_01.groovy   |   73 -
 .../resources/core/ClassDeclaration_02.groovy   |   60 -
 .../resources/core/ClassDeclaration_03.groovy   |   69 -
 .../resources/core/ClassDeclaration_04.groovy   |   40 -
 .../resources/core/ClassDeclaration_05.groovy   |   38 -
 .../resources/core/ClassDeclaration_06.groovy   |  101 -
 .../resources/core/ClassDeclaration_07.groovy   |   45 -
 .../src/test/resources/core/Closure_01.groovy   |   19 -
 .../src/test/resources/core/Closure_02.groovy   |   19 -
 .../src/test/resources/core/Closure_03.groovy   |   19 -
 .../src/test/resources/core/Closure_04.groovy   |   21 -
 .../src/test/resources/core/Closure_05.groovy   |   21 -
 .../src/test/resources/core/Closure_06.groovy   |   27 -
 .../src/test/resources/core/Closure_07.groovy   |   21 -
 .../src/test/resources/core/Closure_08.groovy   |   34 -
 .../src/test/resources/core/Closure_09.groovy   |   34 -
 .../src/test/resources/core/Closure_10.groovy   |   22 -
 .../test/resources/core/CodeBlock_01x.groovy    |   42 -
 .../src/test/resources/core/Command_01.groovy   |   36 -
 .../src/test/resources/core/Command_02.groovy   |   29 -
 .../src/test/resources/core/Command_03.groovy   |   84 -
 .../src/test/resources/core/Command_04.groovy   |   25 -
 .../src/test/resources/core/Command_05.groovy   |   77 -
 .../src/test/resources/core/Command_06x.groovy  |   26 -
 .../src/test/resources/core/Comments_01.groovy  |   46 -
 .../src/test/resources/core/Comments_02.groovy  |  135 -
 .../resources/core/DefaultMethod_01x.groovy     |   39 -
 .../resources/core/DefaultMethod_02x.groovy     |   54 -
 .../src/test/resources/core/DoWhile_01x.groovy  |   25 -
 .../src/test/resources/core/DoWhile_02x.groovy  |   26 -
 .../src/test/resources/core/DoWhile_03x.groovy  |   29 -
 .../src/test/resources/core/DoWhile_04x.groovy  |   32 -
 .../resources/core/ElvisAssignment_01x.groovy   |   56 -
 .../resources/core/EnumDeclaration_01.groovy    |   62 -
 .../resources/core/EnumDeclaration_02.groovy    |   70 -
 .../resources/core/EnumDeclaration_03.groovy    |   24 -
 .../resources/core/EnumDeclaration_04.groovy    |   22 -
 .../resources/core/EnumDeclaration_05.groovy    |   22 -
 .../test/resources/core/Expression_01.groovy    |  248 -
 .../test/resources/core/Expression_02.groovy    |   24 -
 .../test/resources/core/Expression_03.groovy    |   49 -
 .../test/resources/core/Expression_04.groovy    |   80 -
 .../test/resources/core/Expression_05.groovy    |   58 -
 .../test/resources/core/Expression_06.groovy    |   24 -
 .../test/resources/core/Expression_07.groovy    |   27 -
 .../test/resources/core/Expression_08.groovy    |   24 -
 .../test/resources/core/Expression_09.groovy    |   34 -
 .../test/resources/core/Expression_10.groovy    |   43 -
 .../test/resources/core/Expression_11.groovy    |   34 -
 .../test/resources/core/Expression_12.groovy    |   35 -
 .../test/resources/core/Expression_13.groovy    |   63 -
 .../test/resources/core/Expression_14.groovy    |   40 -
 .../test/resources/core/Expression_15.groovy    |  145 -
 .../test/resources/core/Expression_16.groovy    |   40 -
 .../test/resources/core/Expression_17.groovy    |  159 -
 .../test/resources/core/Expression_18.groovy    |   44 -
 .../test/resources/core/Expression_19.groovy    |   50 -
 .../test/resources/core/Expression_20.groovy    |   20 -
 .../test/resources/core/Expression_21x.groovy   |   24 -
 .../test/resources/core/Expression_22x.groovy   |   29 -
 .../test/resources/core/Expression_23x.groovy   |  115 -
 .../src/test/resources/core/For_01.groovy       |   73 -
 .../src/test/resources/core/For_02.groovy       |   54 -
 .../src/test/resources/core/For_03.groovy       |   55 -
 .../src/test/resources/core/For_04x.groovy      |   54 -
 .../src/test/resources/core/For_05x.groovy      |   56 -
 .../src/test/resources/core/GString_01.groovy   |   48 -
 .../src/test/resources/core/GString_02.groovy   |   77 -
 .../src/test/resources/core/GString_03.groovy   |   67 -
 .../src/test/resources/core/GString_04.groovy   |   19 -
 .../src/test/resources/core/GString_05.groovy   |   19 -
 .../src/test/resources/core/GString_06.groovy   |   19 -
 .../test/resources/core/Groovydoc_01x.groovy    |   70 -
 .../test/resources/core/IdenticalOp_01x.groovy  |   28 -
 .../src/test/resources/core/IfElse_01.groovy    |   62 -
 .../resources/core/ImportDeclaration_01.groovy  |   19 -
 .../resources/core/ImportDeclaration_02.groovy  |   19 -
 .../resources/core/ImportDeclaration_03.groovy  |   22 -
 .../resources/core/ImportDeclaration_04.groovy  |   23 -
 .../resources/core/ImportDeclaration_05.groovy  |   19 -
 .../resources/core/ImportDeclaration_06.groovy  |   21 -
 .../resources/core/ImportDeclaration_07.groovy  |   24 -
 .../resources/core/ImportDeclaration_08.groovy  |   46 -
 .../core/InterfaceDeclaration_01.groovy         |   54 -
 .../core/InterfaceDeclaration_02.groovy         |   60 -
 .../core/InterfaceDeclaration_03.groovy         |   25 -
 .../src/test/resources/core/Label_01.groovy     |   33 -
 .../src/test/resources/core/Lambda_01x.groovy   |   66 -
 .../src/test/resources/core/List_01.groovy      |   33 -
 .../src/test/resources/core/Literal_01.groovy   |   97 -
 .../src/test/resources/core/Literal_02.groovy   |   66 -
 .../src/test/resources/core/Literal_03.groovy   |   21 -
 .../core/LocalVariableDeclaration_01.groovy     |  128 -
 .../src/test/resources/core/Map_01.groovy       |   47 -
 .../resources/core/MethodDeclaration_01.groovy  |   50 -
 .../resources/core/MethodDeclaration_02.groovy  |   59 -
 .../resources/core/MethodPointer_01x.groovy     |   23 -
 .../resources/core/MethodReference_01x.groovy   |  103 -
 .../core/NegativeRelationalOperators_01x.groovy |   39 -
 .../core/NegativeRelationalOperators_02x.groovy |   36 -
 .../resources/core/PackageDeclaration_01.groovy |   19 -
 .../resources/core/PackageDeclaration_02.groovy |   19 -
 .../resources/core/PackageDeclaration_03.groovy |   19 -
 .../resources/core/PackageDeclaration_04.groovy |   38 -
 .../resources/core/PackageDeclaration_05.groovy |   41 -
 .../resources/core/PackageDeclaration_06.groovy |   19 -
 .../src/test/resources/core/Return_01.groovy    |   26 -
 .../test/resources/core/SafeIndex_01x.groovy    |   28 -
 .../test/resources/core/SafeIndex_02x.groovy    |   65 -
 .../test/resources/core/SafeIndex_03x.groovy    |  298 --
 .../src/test/resources/core/Script_01x.groovy   |   23 -
 .../src/test/resources/core/Switch_01.groovy    |   78 -
 .../test/resources/core/Synchronized_01.groovy  |   54 -
 .../src/test/resources/core/Throw_01.groovy     |   20 -
 .../resources/core/TraitDeclaration_01.groovy   |   60 -
 .../resources/core/TraitDeclaration_02.groovy   |   58 -
 .../resources/core/TraitDeclaration_03.groovy   |   66 -
 .../resources/core/TraitDeclaration_04.groovy   |   46 -
 .../resources/core/TraitDeclaration_05.groovy   |   41 -
 .../src/test/resources/core/TryCatch_01.groovy  |  130 -
 .../resources/core/TryWithResources_01x.groovy  |  284 --
 .../src/test/resources/core/Unicode_01.groovy   |   42 -
 .../src/test/resources/core/While_01.groovy     |   76 -
 .../src/test/resources/core/While_02x.groovy    |   23 -
 .../resources/fail/AbstractMethod_01x.groovy    |   21 -
 .../resources/fail/AbstractMethod_02x.groovy    |   22 -
 .../resources/fail/AbstractMethod_03x.groovy    |   21 -
 .../resources/fail/AbstractMethod_04x.groovy    |   19 -
 .../resources/fail/AbstractMethod_05x.groovy    |   19 -
 .../resources/fail/AbstractMethod_06x.groovy    |   19 -
 .../src/test/resources/fail/Break_01x.groovy    |   19 -
 .../src/test/resources/fail/Break_02x.groovy    |   21 -
 .../resources/fail/ClassDeclaration_01x.groovy  |   25 -
 .../fail/ClosureListExpression_01.groovy        |   19 -
 .../fail/ClosureListExpression_02.groovy        |   19 -
 .../fail/ClosureListExpression_03.groovy        |   19 -
 .../fail/ClosureListExpression_04.groovy        |   28 -
 .../fail/ConstructorDeclaration_01.groovy       |   19 -
 .../src/test/resources/fail/Continue_01x.groovy |   19 -
 .../src/test/resources/fail/Continue_02x.groovy |   21 -
 .../src/test/resources/fail/DoWhile_01x.groovy  |   22 -
 .../test/resources/fail/Expression_01.groovy    |   19 -
 .../test/resources/fail/Expression_02.groovy    |   19 -
 .../test/resources/fail/Expression_03.groovy    |   19 -
 .../test/resources/fail/Expression_04.groovy    |   19 -
 .../test/resources/fail/Expression_05.groovy    |   19 -
 .../test/resources/fail/Expression_06.groovy    |   19 -
 .../test/resources/fail/Expression_07.groovy    |   19 -
 .../test/resources/fail/Expression_08.groovy    |   19 -
 .../test/resources/fail/Expression_09.groovy    |   19 -
 .../src/test/resources/fail/For_01.groovy       |   19 -
 .../src/test/resources/fail/For_02.groovy       |   19 -
 .../fail/InterfaceDeclaration_01.groovy         |   21 -
 .../src/test/resources/fail/List_01.groovy      |   19 -
 .../fail/LocalVariableDeclaration_01.groovy     |   19 -
 .../resources/fail/MethodDeclaration_01.groovy  |   23 -
 .../src/test/resources/fail/Modifier_01x.groovy |   19 -
 .../src/test/resources/fail/Modifier_02x.groovy |   19 -
 .../src/test/resources/fail/Modifier_03x.groovy |   19 -
 .../src/test/resources/fail/Modifier_04x.groovy |   21 -
 .../src/test/resources/fail/Modifier_05x.groovy |   21 -
 .../src/test/resources/fail/Modifier_07.groovy  |   19 -
 .../resources/fail/ParExpression_01x.groovy     |   19 -
 .../resources/fail/ParExpression_02x.groovy     |   19 -
 .../resources/fail/ParExpression_03x.groovy     |   19 -
 .../test/resources/fail/Parentheses_01.groovy   |   20 -
 .../src/test/resources/fail/Super_01x.groovy    |   24 -
 .../src/test/resources/fail/Switch_01.groovy    |   27 -
 .../src/test/resources/fail/This_01x.groovy     |   26 -
 .../fail/UnexpectedCharacter_01x.groovy         |   19 -
 .../src/test/resources/fail/Void_01x.groovy     |   21 -
 .../src/test/resources/fail/Void_02x.groovy     |   23 -
 subprojects/parser-antlr4/README.adoc           |   59 +
 subprojects/parser-antlr4/build.gradle          |   70 +
 .../apache/groovy/parser/antlr4/GroovyLexer.g4  |  882 ++++
 .../apache/groovy/parser/antlr4/GroovyParser.g4 | 1270 ++++++
 .../parser/antlr4/util/GroovyTestRig.groovy     |   74 +
 .../apache/groovy/parser/AbstractParser.java    |   83 +
 .../org/apache/groovy/parser/Antlr2Parser.java  |   34 +
 .../org/apache/groovy/parser/Antlr4Parser.java  |   39 +
 .../groovy/parser/antlr4/AbstractLexer.java     |   32 +
 .../groovy/parser/antlr4/AbstractParser.java    |   32 +
 .../parser/antlr4/Antlr4ParserPlugin.java       |   45 +
 .../parser/antlr4/Antlr4PluginFactory.java      |   35 +
 .../apache/groovy/parser/antlr4/AstBuilder.java | 4317 ++++++++++++++++++
 .../groovy/parser/antlr4/GroovyLangLexer.java   |   63 +
 .../groovy/parser/antlr4/GroovyLangParser.java  |   38 +
 .../groovy/parser/antlr4/GroovySyntaxError.java |   53 +
 .../groovy/parser/antlr4/GroovydocManager.java  |  183 +
 .../groovy/parser/antlr4/ModifierManager.java   |  198 +
 .../groovy/parser/antlr4/ModifierNode.java      |  164 +
 .../groovy/parser/antlr4/PositionInfo.java      |   73 +
 .../parser/antlr4/SemanticPredicates.java       |  152 +
 .../parser/antlr4/SyntaxErrorReportable.java    |   58 +
 .../TryWithResourcesASTTransformation.java      |  370 ++
 .../parser/antlr4/internal/AtnManager.java      |  107 +
 .../internal/DescriptiveErrorStrategy.java      |  110 +
 .../groovy/parser/antlr4/util/StringUtils.java  |  149 +
 .../parser/antlr4/GroovyParserTest.groovy       |  368 ++
 .../groovy/parser/antlr4/SyntaxErrorTest.groovy |  181 +
 .../groovy/parser/antlr4/TestUtils.groovy       |  259 ++
 .../antlr4/util/ASTComparatorCategory.groovy    |  526 +++
 .../groovy/parser/antlr4/util/AstDumper.groovy  | 1025 +++++
 .../test/resources/bugs/BUG-GROOVY-2324.groovy  |   23 +
 .../test/resources/bugs/BUG-GROOVY-4438.groovy  |   26 +
 .../test/resources/bugs/BUG-GROOVY-4757.groovy  |   27 +
 .../test/resources/bugs/BUG-GROOVY-4762.groovy  |   27 +
 .../test/resources/bugs/BUG-GROOVY-5318.groovy  |   19 +
 .../test/resources/bugs/BUG-GROOVY-5652.groovy  |   24 +
 .../test/resources/bugs/BUG-GROOVY-6038.groovy  |   37 +
 .../test/resources/bugs/BUG-GROOVY-8150.groovy  |   21 +
 .../test/resources/bugs/BUG-GROOVY-8161.groovy  |   20 +
 .../src/test/resources/bugs/GROOVY-3898.groovy  |   26 +
 .../core/AnnotationDeclaration_01.groovy        |   57 +
 .../test/resources/core/Annotation_01.groovy    |   19 +
 .../test/resources/core/Annotation_02.groovy    |   20 +
 .../test/resources/core/Annotation_03.groovy    |   21 +
 .../test/resources/core/Annotation_04.groovy    |   20 +
 .../test/resources/core/Annotation_05.groovy    |   19 +
 .../test/resources/core/Annotation_06.groovy    |   20 +
 .../test/resources/core/Annotation_07.groovy    |   20 +
 .../test/resources/core/Annotation_08.groovy    |   28 +
 .../test/resources/core/Annotation_09.groovy    |   32 +
 .../test/resources/core/Annotation_10x.groovy   |   38 +
 .../src/test/resources/core/Array_01x.groovy    |  104 +
 .../src/test/resources/core/Assert_01.groovy    |   46 +
 .../src/test/resources/core/Assert_02x.groovy   |   55 +
 .../src/test/resources/core/Assert_03x.groovy   |   44 +
 .../resources/core/BreakingChange_01x.groovy    |   42 +
 .../resources/core/BreakingChange_02x.groovy    |   27 +
 .../resources/core/BreakingChange_03x.groovy    |   34 +
 .../resources/core/BreakingChange_04x.groovy    |   44 +
 .../resources/core/ClassDeclaration_01.groovy   |   73 +
 .../resources/core/ClassDeclaration_02.groovy   |   60 +
 .../resources/core/ClassDeclaration_03.groovy   |   69 +
 .../resources/core/ClassDeclaration_04.groovy   |   40 +
 .../resources/core/ClassDeclaration_05.groovy   |   38 +
 .../resources/core/ClassDeclaration_06.groovy   |  101 +
 .../resources/core/ClassDeclaration_07.groovy   |   45 +
 .../src/test/resources/core/Closure_01.groovy   |   19 +
 .../src/test/resources/core/Closure_02.groovy   |   19 +
 .../src/test/resources/core/Closure_03.groovy   |   19 +
 .../src/test/resources/core/Closure_04.groovy   |   21 +
 .../src/test/resources/core/Closure_05.groovy   |   21 +
 .../src/test/resources/core/Closure_06.groovy   |   27 +
 .../src/test/resources/core/Closure_07.groovy   |   21 +
 .../src/test/resources/core/Closure_08.groovy   |   34 +
 .../src/test/resources/core/Closure_09.groovy   |   34 +
 .../src/test/resources/core/Closure_10.groovy   |   22 +
 .../test/resources/core/CodeBlock_01x.groovy    |   42 +
 .../src/test/resources/core/Command_01.groovy   |   36 +
 .../src/test/resources/core/Command_02.groovy   |   29 +
 .../src/test/resources/core/Command_03.groovy   |   84 +
 .../src/test/resources/core/Command_04.groovy   |   25 +
 .../src/test/resources/core/Command_05.groovy   |   77 +
 .../src/test/resources/core/Command_06x.groovy  |   26 +
 .../src/test/resources/core/Comments_01.groovy  |   46 +
 .../src/test/resources/core/Comments_02.groovy  |  135 +
 .../resources/core/DefaultMethod_01x.groovy     |   39 +
 .../resources/core/DefaultMethod_02x.groovy     |   54 +
 .../src/test/resources/core/DoWhile_01x.groovy  |   25 +
 .../src/test/resources/core/DoWhile_02x.groovy  |   26 +
 .../src/test/resources/core/DoWhile_03x.groovy  |   29 +
 .../src/test/resources/core/DoWhile_04x.groovy  |   32 +
 .../resources/core/ElvisAssignment_01x.groovy   |   56 +
 .../resources/core/EnumDeclaration_01.groovy    |   62 +
 .../resources/core/EnumDeclaration_02.groovy    |   70 +
 .../resources/core/EnumDeclaration_03.groovy    |   24 +
 .../resources/core/EnumDeclaration_04.groovy    |   22 +
 .../resources/core/EnumDeclaration_05.groovy    |   22 +
 .../test/resources/core/Expression_01.groovy    |  248 +
 .../test/resources/core/Expression_02.groovy    |   24 +
 .../test/resources/core/Expression_03.groovy    |   49 +
 .../test/resources/core/Expression_04.groovy    |   80 +
 .../test/resources/core/Expression_05.groovy    |   58 +
 .../test/resources/core/Expression_06.groovy    |   24 +
 .../test/resources/core/Expression_07.groovy    |   27 +
 .../test/resources/core/Expression_08.groovy    |   24 +
 .../test/resources/core/Expression_09.groovy    |   34 +
 .../test/resources/core/Expression_10.groovy    |   43 +
 .../test/resources/core/Expression_11.groovy    |   34 +
 .../test/resources/core/Expression_12.groovy    |   35 +
 .../test/resources/core/Expression_13.groovy    |   63 +
 .../test/resources/core/Expression_14.groovy    |   40 +
 .../test/resources/core/Expression_15.groovy    |  145 +
 .../test/resources/core/Expression_16.groovy    |   40 +
 .../test/resources/core/Expression_17.groovy    |  159 +
 .../test/resources/core/Expression_18.groovy    |   44 +
 .../test/resources/core/Expression_19.groovy    |   50 +
 .../test/resources/core/Expression_20.groovy    |   20 +
 .../test/resources/core/Expression_21x.groovy   |   24 +
 .../test/resources/core/Expression_22x.groovy   |   29 +
 .../test/resources/core/Expression_23x.groovy   |  115 +
 .../src/test/resources/core/For_01.groovy       |   73 +
 .../src/test/resources/core/For_02.groovy       |   54 +
 .../src/test/resources/core/For_03.groovy       |   55 +
 .../src/test/resources/core/For_04x.groovy      |   54 +
 .../src/test/resources/core/For_05x.groovy      |   56 +
 .../src/test/resources/core/GString_01.groovy   |   48 +
 .../src/test/resources/core/GString_02.groovy   |   77 +
 .../src/test/resources/core/GString_03.groovy   |   67 +
 .../src/test/resources/core/GString_04.groovy   |   19 +
 .../src/test/resources/core/GString_05.groovy   |   19 +
 .../src/test/resources/core/GString_06.groovy   |   19 +
 .../test/resources/core/Groovydoc_01x.groovy    |   70 +
 .../test/resources/core/IdenticalOp_01x.groovy  |   28 +
 .../src/test/resources/core/IfElse_01.groovy    |   62 +
 .../resources/core/ImportDeclaration_01.groovy  |   19 +
 .../resources/core/ImportDeclaration_02.groovy  |   19 +
 .../resources/core/ImportDeclaration_03.groovy  |   22 +
 .../resources/core/ImportDeclaration_04.groovy  |   23 +
 .../resources/core/ImportDeclaration_05.groovy  |   19 +
 .../resources/core/ImportDeclaration_06.groovy  |   21 +
 .../resources/core/ImportDeclaration_07.groovy  |   24 +
 .../resources/core/ImportDeclaration_08.groovy  |   46 +
 .../core/InterfaceDeclaration_01.groovy         |   54 +
 .../core/InterfaceDeclaration_02.groovy         |   60 +
 .../core/InterfaceDeclaration_03.groovy         |   25 +
 .../src/test/resources/core/Label_01.groovy     |   33 +
 .../src/test/resources/core/Lambda_01x.groovy   |   66 +
 .../src/test/resources/core/List_01.groovy      |   33 +
 .../src/test/resources/core/Literal_01.groovy   |   97 +
 .../src/test/resources/core/Literal_02.groovy   |   66 +
 .../src/test/resources/core/Literal_03.groovy   |   21 +
 .../core/LocalVariableDeclaration_01.groovy     |  128 +
 .../src/test/resources/core/Map_01.groovy       |   47 +
 .../resources/core/MethodDeclaration_01.groovy  |   50 +
 .../resources/core/MethodDeclaration_02.groovy  |   59 +
 .../resources/core/MethodPointer_01x.groovy     |   23 +
 .../resources/core/MethodReference_01x.groovy   |  103 +
 .../core/NegativeRelationalOperators_01x.groovy |   39 +
 .../core/NegativeRelationalOperators_02x.groovy |   36 +
 .../resources/core/PackageDeclaration_01.groovy |   19 +
 .../resources/core/PackageDeclaration_02.groovy |   19 +
 .../resources/core/PackageDeclaration_03.groovy |   19 +
 .../resources/core/PackageDeclaration_04.groovy |   38 +
 .../resources/core/PackageDeclaration_05.groovy |   41 +
 .../resources/core/PackageDeclaration_06.groovy |   19 +
 .../src/test/resources/core/Return_01.groovy    |   26 +
 .../test/resources/core/SafeIndex_01x.groovy    |   28 +
 .../test/resources/core/SafeIndex_02x.groovy    |   65 +
 .../test/resources/core/SafeIndex_03x.groovy    |  298 ++
 .../src/test/resources/core/Script_01x.groovy   |   23 +
 .../src/test/resources/core/Switch_01.groovy    |   78 +
 .../test/resources/core/Synchronized_01.groovy  |   54 +
 .../src/test/resources/core/Throw_01.groovy     |   20 +
 .../resources/core/TraitDeclaration_01.groovy   |   60 +
 .../resources/core/TraitDeclaration_02.groovy   |   58 +
 .../resources/core/TraitDeclaration_03.groovy   |   66 +
 .../resources/core/TraitDeclaration_04.groovy   |   46 +
 .../resources/core/TraitDeclaration_05.groovy   |   41 +
 .../src/test/resources/core/TryCatch_01.groovy  |  130 +
 .../resources/core/TryWithResources_01x.groovy  |  284 ++
 .../src/test/resources/core/Unicode_01.groovy   |   42 +
 .../src/test/resources/core/While_01.groovy     |   76 +
 .../src/test/resources/core/While_02x.groovy    |   23 +
 .../resources/fail/AbstractMethod_01x.groovy    |   21 +
 .../resources/fail/AbstractMethod_02x.groovy    |   22 +
 .../resources/fail/AbstractMethod_03x.groovy    |   21 +
 .../resources/fail/AbstractMethod_04x.groovy    |   19 +
 .../resources/fail/AbstractMethod_05x.groovy    |   19 +
 .../resources/fail/AbstractMethod_06x.groovy    |   19 +
 .../src/test/resources/fail/Break_01x.groovy    |   19 +
 .../src/test/resources/fail/Break_02x.groovy    |   21 +
 .../resources/fail/ClassDeclaration_01x.groovy  |   25 +
 .../fail/ClosureListExpression_01.groovy        |   19 +
 .../fail/ClosureListExpression_02.groovy        |   19 +
 .../fail/ClosureListExpression_03.groovy        |   19 +
 .../fail/ClosureListExpression_04.groovy        |   28 +
 .../fail/ConstructorDeclaration_01.groovy       |   19 +
 .../src/test/resources/fail/Continue_01x.groovy |   19 +
 .../src/test/resources/fail/Continue_02x.groovy |   21 +
 .../src/test/resources/fail/DoWhile_01x.groovy  |   22 +
 .../test/resources/fail/Expression_01.groovy    |   19 +
 .../test/resources/fail/Expression_02.groovy    |   19 +
 .../test/resources/fail/Expression_03.groovy    |   19 +
 .../test/resources/fail/Expression_04.groovy    |   19 +
 .../test/resources/fail/Expression_05.groovy    |   19 +
 .../test/resources/fail/Expression_06.groovy    |   19 +
 .../test/resources/fail/Expression_07.groovy    |   19 +
 .../test/resources/fail/Expression_08.groovy    |   19 +
 .../test/resources/fail/Expression_09.groovy    |   19 +
 .../src/test/resources/fail/For_01.groovy       |   19 +
 .../src/test/resources/fail/For_02.groovy       |   19 +
 .../fail/InterfaceDeclaration_01.groovy         |   21 +
 .../src/test/resources/fail/List_01.groovy      |   19 +
 .../fail/LocalVariableDeclaration_01.groovy     |   19 +
 .../resources/fail/MethodDeclaration_01.groovy  |   23 +
 .../src/test/resources/fail/Modifier_01x.groovy |   19 +
 .../src/test/resources/fail/Modifier_02x.groovy |   19 +
 .../src/test/resources/fail/Modifier_03x.groovy |   19 +
 .../src/test/resources/fail/Modifier_04x.groovy |   21 +
 .../src/test/resources/fail/Modifier_05x.groovy |   21 +
 .../src/test/resources/fail/Modifier_07.groovy  |   19 +
 .../resources/fail/ParExpression_01x.groovy     |   19 +
 .../resources/fail/ParExpression_02x.groovy     |   19 +
 .../resources/fail/ParExpression_03x.groovy     |   19 +
 .../test/resources/fail/Parentheses_01.groovy   |   20 +
 .../src/test/resources/fail/Super_01x.groovy    |   24 +
 .../src/test/resources/fail/Switch_01.groovy    |   27 +
 .../src/test/resources/fail/This_01x.groovy     |   26 +
 .../fail/UnexpectedCharacter_01x.groovy         |   19 +
 .../src/test/resources/fail/Void_01x.groovy     |   21 +
 .../src/test/resources/fail/Void_02x.groovy     |   23 +
 466 files changed, 19408 insertions(+), 19409 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/2c01e99f/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 2254e1e..47e0d19 100644
--- a/build.gradle
+++ b/build.gradle
@@ -312,7 +312,7 @@ sourceSets {
     }
 }
 
-apply from: 'subprojects/groovy-parser-antlr4/build.gradle'
+apply from: 'subprojects/parser-antlr4/build.gradle'
 
 // make sure examples can be compiled, even if we don't run them
 // todo: reorganize examples so that we can run them too

http://git-wip-us.apache.org/repos/asf/groovy/blob/2c01e99f/settings.gradle
----------------------------------------------------------------------
diff --git a/settings.gradle b/settings.gradle
index 56b0dc4..5df4d51 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -33,7 +33,6 @@ def subprojects = ['groovy-ant',
         'groovy-test',
         'groovy-testng',
         'groovy-xml',
-        'groovy-parser-antlr4',
         'groovy-macro'
 ]
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/2c01e99f/subprojects/groovy-parser-antlr4/README.adoc
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/README.adoc b/subprojects/groovy-parser-antlr4/README.adoc
deleted file mode 100644
index 4170426..0000000
--- a/subprojects/groovy-parser-antlr4/README.adoc
+++ /dev/null
@@ -1,59 +0,0 @@
-//////////////////////////////////////////
-
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements.  See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership.  The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License.  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied.  See the License for the
-  specific language governing permissions and limitations
-  under the License.
-
-//////////////////////////////////////////
-
-== This is the home of the new parser Parrot, which is based on Antlr4.
-
-The new parser(Parrot) can parse Groovy source code and construct the related AST, which is almost identical to the one generated by the old parser(except the corrected node position, e.g. line, column of node). Currently all features of Groovy are available. In addition, **the following new features have been added:**
-
-* do-while loop, standard loop(e.g. `for(int i = 0, j = 10; i < j; i++, j--) {..}`)
-* lambda expression
-* method reference and constructor reference
-* try-with-resources(i.e. ARM)
-* code block(i.e. `{..}`)
-* array initializer of Java style(e.g. `new int[] {1, 2, 3}`)
-* default method of interface
-* new operators: identity operators(`===`, `!==`), elvis assignment(`?=`), `!in`, `!instanceof`
-* safe index(e.g. `nullableVar?[1, 2]`)
-* runtime groovydoc(i.e. groovydoc with `@Groovydoc`), groovydoc attached to AST node as metadata
-
-=== How to enable the new parser
-
-* In the gradle build the property useAntlr4 has to be set to enable the build of the parser and the execution of all tests with it. Command line example:
-```
-./gradlew -PuseAntlr4=true bootstrapJar
-```
-* To enable the new parser automatically at runtime the system property groovy.antlr4 has to be set. Command line example:
-```
-export JAVA_OPTS="-Dgroovy.antlr4=true"
-groovy foo.groovy
-```
-* This system property also controls groovyc and has to be used in case it is used outside of this build, for example with:
-```
-groovyOptions.forkOptions.jvmArgs += ["-Dgroovy.antlr4=true"]
-```
-
-=== JVM system properties to control parsing
-
-* `groovy.antlr4.cache.threshold`: how frequently to clear DFA cache(default: 50). **Notice:** The more frequently the DFA cache is cleared, the poorer parsing performance will be(you can not set the value that is less than the default value). But the DFA cache has to be cleared to avoid OutOfMemoryError's occurring. 
-* `groovy.extract.doc.comment`: whether to collect groovydoc while parsing groovy source code(default: false)
-
-*P.S. Parrot is based on the highly optimized version of antlr4(com.tunnelvisionlabs:antlr4), which is licensed under BSD.*
- 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/groovy/blob/2c01e99f/subprojects/groovy-parser-antlr4/build.gradle
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/build.gradle b/subprojects/groovy-parser-antlr4/build.gradle
deleted file mode 100644
index 7570dcf..0000000
--- a/subprojects/groovy-parser-antlr4/build.gradle
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-if (!rootProject.hasProperty('useAntlr4')) return
-
-apply plugin: 'me.champeau.gradle.antlr4'
-
-def srcBase = "subprojects/groovy-parser-antlr4/src"
-def srcMain = "$srcBase/main"
-def srcTest = "$srcBase/test"
-def antlr4Source = "$srcMain/antlr4"
-def antlr4OutputRootDir = "$buildDir/generated-sources"
-def antlr4Output = "$antlr4OutputRootDir/org/apache/groovy/parser/antlr4"
-
-// set package for antlr generated classes
-antlr4 {
-    source = file(antlr4Source)
-    extraArgs = ["-no-listener", "-package", "org.apache.groovy.parser.antlr4"]
-    output = file(antlr4Output)
-}
-
-// make the Java compile task depend on the antlr4 task
-compileJava.dependsOn antlr4
-
-// add antlr4 to classpath
-configurations {
-   compile.extendsFrom antlr4
-}
-
-dependencies {
-    antlr4 "com.tunnelvisionlabs:antlr4:$antlr4Version"
-    testCompile project(':groovy-test')
-}
-
-
-task cleanGeneratedSources(type: Delete) {
-    delete antlr4OutputRootDir
-    file(antlr4OutputRootDir).mkdirs()
-}
-
-antlr4.dependsOn cleanGeneratedSources
-
-// add the generated source files to the list of java sources
-sourceSets.main.java.srcDirs += file("$antlr4OutputRootDir");
-sourceSets.main.java.srcDirs += file("$srcMain/java");
-sourceSets.main.groovy.srcDirs += file("$srcMain/groovy");
-sourceSets.main.resources.srcDirs += file("$antlr4Source");
-sourceSets.main.resources.srcDirs += file("$srcMain/resources");
-sourceSets.test.java.srcDirs += file("$srcTest/java");
-sourceSets.test.groovy.srcDirs += file("$srcTest/groovy");
-sourceSets.test.resources.srcDirs += file("$srcTest/resources");
-
-test {
-    jvmArgs "-Dgroovy.extract.doc.comment=true", "-Dgroovy.antlr4.cache.threshold=100"
-}

http://git-wip-us.apache.org/repos/asf/groovy/blob/2c01e99f/subprojects/groovy-parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4 b/subprojects/groovy-parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
deleted file mode 100644
index 7bcec42..0000000
--- a/subprojects/groovy-parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
+++ /dev/null
@@ -1,882 +0,0 @@
-/*
- * This file is adapted from the Antlr4 Java grammar which has the following license
- *
- *  Copyright (c) 2013 Terence Parr, Sam Harwell
- *  All rights reserved.
- *  [The "BSD licence"]
- *
- *    http://www.opensource.org/licenses/bsd-license.php
- *
- * Subsequent modifications by the Groovy community have been done under the Apache License v2:
- *
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-/**
- * The Groovy grammar is based on the official grammar for Java:
- * https://github.com/antlr/grammars-v4/blob/master/java/Java.g4
- */
-lexer grammar GroovyLexer;
-
-options {
-    superClass = AbstractLexer;
-}
-
-@header {
-    import static org.apache.groovy.parser.antlr4.SemanticPredicates.*;
-    import java.util.Deque;
-    import java.util.ArrayDeque;
-    import java.util.Map;
-    import java.util.HashMap;
-    import java.util.Set;
-    import java.util.HashSet;
-    import java.util.Collections;
-    import java.util.Arrays;
-}
-
-@members {
-    private long tokenIndex     = 0;
-    private int  lastTokenType  = 0;
-
-    /**
-     * Record the index and token type of the current token while emitting tokens.
-     */
-    @Override
-    public void emit(Token token) {
-        this.tokenIndex++;
-
-        int tokenType = token.getType();
-        if (Token.DEFAULT_CHANNEL == token.getChannel()) {
-            this.lastTokenType = tokenType;
-        }
-
-        if (RollBackOne == tokenType) {
-            this.rollbackOneChar();
-        }
-
-        super.emit(token);
-    }
-
-    private static final Set<Integer> REGEX_CHECK_SET =
-                                            Collections.unmodifiableSet(
-                                                new HashSet<>(Arrays.asList(Identifier, CapitalizedIdentifier, NullLiteral, BooleanLiteral, THIS, RPAREN, RBRACK, RBRACE, IntegerLiteral, FloatingPointLiteral, StringLiteral, GStringEnd, INC, DEC)));
-    private boolean isRegexAllowed() {
-        if (REGEX_CHECK_SET.contains(this.lastTokenType)) {
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * just a hook, which will be overrided by GroovyLangLexer
-     */
-    protected void rollbackOneChar() {}
-
-    private static class Paren {
-        private String text;
-        private int lastTokenType;
-        private int line;
-        private int column;
-
-        public Paren(String text, int lastTokenType, int line, int column) {
-            this.text = text;
-            this.lastTokenType = lastTokenType;
-            this.line = line;
-            this.column = column;
-        }
-
-        public String getText() {
-            return this.text;
-        }
-
-        public int getLastTokenType() {
-            return this.lastTokenType;
-        }
-
-        public int getLine() {
-            return line;
-        }
-
-        public int getColumn() {
-            return column;
-        }
-
-        @Override
-        public int hashCode() {
-            return (int) (text.hashCode() * line + column);
-        }
-
-        @Override
-        public boolean equals(Object obj) {
-            if (!(obj instanceof Paren)) {
-                return false;
-            }
-
-            Paren other = (Paren) obj;
-
-            return this.text.equals(other.text) && (this.line == other.line && this.column == other.column);
-        }
-    }
-
-    private static final Map<String, String> PAREN_MAP = Collections.unmodifiableMap(new HashMap<String, String>() {
-        {
-            put("(", ")");
-            put("[", "]");
-            put("{", "}");
-        }
-    });
-
-    private final Deque<Paren> parenStack = new ArrayDeque<>(32);
-    private void enterParen() {
-        parenStack.push(new Paren(getText(), this.lastTokenType, getLine(), getCharPositionInLine() + 1));
-    }
-    private void exitParen() {
-        Paren paren = parenStack.peek();
-        String text = getText();
-
-        require(null != paren, "Too many '" + text + "'");
-        require(text.equals(PAREN_MAP.get(paren.getText())),
-                "'" + paren.getText() + "'" + new PositionInfo(paren.getLine(), paren.getColumn()) + " can not match '" + text + "'");
-
-        parenStack.pop();
-    }
-    private boolean isInsideParens() {
-        Paren paren = parenStack.peek();
-
-        // We just care about "(" and "[", inside which the new lines will be ignored.
-        // Notice: the new lines between "{" and "}" can not be ignored.
-        if (null == paren) {
-            return false;
-        }
-        return ("(".equals(paren.getText()) && TRY != paren.getLastTokenType()) // we don't treat try-paren(i.e. try (....)) as parenthesis
-                    || "[".equals(paren.getText());
-    }
-    private void ignoreTokenInsideParens() {
-        if (!this.isInsideParens()) {
-            return;
-        }
-
-        this.setChannel(Token.HIDDEN_CHANNEL);
-    }
-    private void ignoreMultiLineCommentConditionally() {
-        if (!this.isInsideParens() && isFollowedByWhiteSpaces(_input)) {
-            return;
-        }
-
-        this.setChannel(Token.HIDDEN_CHANNEL);
-    }
-
-    @Override
-    public int getSyntaxErrorSource() {
-        return GroovySyntaxError.LEXER;
-    }
-
-    @Override
-    public int getErrorLine() {
-        return getLine();
-    }
-
-    @Override
-    public int getErrorColumn() {
-        return getCharPositionInLine() + 1;
-    }
-}
-
-
-// §3.10.5 String Literals
-
-StringLiteral
-    :   '"'      DqStringCharacter*?           '"'
-    |   '\''     SqStringCharacter*?           '\''
-
-    |   '/'      { this.isRegexAllowed() && _input.LA(1) != '*' }?
-                 SlashyStringCharacter+?       '/'
-
-    |   '"""'    TdqStringCharacter*?          '"""'
-    |   '\'\'\'' TsqStringCharacter*?          '\'\'\''
-    |   '$/'     DollarSlashyStringCharacter+? '/$'
-    ;
-
-// Groovy gstring
-GStringBegin
-    :   '"' DqStringCharacter*? DOLLAR -> pushMode(DQ_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-TdqGStringBegin
-    :   '"""'   TdqStringCharacter*? DOLLAR -> type(GStringBegin), pushMode(TDQ_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-SlashyGStringBegin
-    :   '/' { this.isRegexAllowed() && _input.LA(1) != '*' }? SlashyStringCharacter*? DOLLAR { isFollowedByJavaLetterInGString(_input) }? -> type(GStringBegin), pushMode(SLASHY_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-DollarSlashyGStringBegin
-    :   '$/' DollarSlashyStringCharacter*? DOLLAR { isFollowedByJavaLetterInGString(_input) }? -> type(GStringBegin), pushMode(DOLLAR_SLASHY_GSTRING_MODE), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-
-mode DQ_GSTRING_MODE;
-GStringEnd
-    :   '"'     -> popMode
-    ;
-GStringPart
-    :   DOLLAR  -> pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-GStringCharacter
-    :   DqStringCharacter -> more
-    ;
-
-mode TDQ_GSTRING_MODE;
-TdqGStringEnd
-    :   '"""'    -> type(GStringEnd), popMode
-    ;
-TdqGStringPart
-    :   DOLLAR   -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-TdqGStringCharacter
-    :   TdqStringCharacter -> more
-    ;
-
-mode SLASHY_GSTRING_MODE;
-SlashyGStringEnd
-    :   '$'? '/'  -> type(GStringEnd), popMode
-    ;
-SlashyGStringPart
-    :   DOLLAR { isFollowedByJavaLetterInGString(_input) }?   -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-SlashyGStringCharacter
-    :   SlashyStringCharacter -> more
-    ;
-
-mode DOLLAR_SLASHY_GSTRING_MODE;
-DollarSlashyGStringEnd
-    :   '/$'      -> type(GStringEnd), popMode
-    ;
-DollarSlashyGStringPart
-    :   DOLLAR { isFollowedByJavaLetterInGString(_input) }?   -> type(GStringPart), pushMode(GSTRING_TYPE_SELECTOR_MODE)
-    ;
-DollarSlashyGStringCharacter
-    :   DollarSlashyStringCharacter -> more
-    ;
-
-mode GSTRING_TYPE_SELECTOR_MODE;
-GStringLBrace
-    :   '{' { this.enterParen();  } -> type(LBRACE), popMode, pushMode(DEFAULT_MODE)
-    ;
-GStringIdentifier
-    :   IdentifierInGString -> type(Identifier), popMode, pushMode(GSTRING_PATH_MODE)
-    ;
-
-
-mode GSTRING_PATH_MODE;
-GStringPathPart
-    :   '.' IdentifierInGString
-    ;
-RollBackOne
-    :   . {
-            // a trick to handle GStrings followed by EOF properly
-            if (EOF == _input.LA(1) && ('"' == _input.LA(-1) || '/' == _input.LA(-1))) {
-                setType(GStringEnd);
-            } else {
-                setChannel(HIDDEN);
-            }
-          } -> popMode
-    ;
-
-
-mode DEFAULT_MODE;
-// character in the double quotation string. e.g. "a"
-fragment
-DqStringCharacter
-    :   ~["\\$]
-    |   EscapeSequence
-    ;
-
-// character in the single quotation string. e.g. 'a'
-fragment
-SqStringCharacter
-    :   ~['\\]
-    |   EscapeSequence
-    ;
-
-// character in the triple double quotation string. e.g. """a"""
-fragment TdqStringCharacter
-    :   ~["\\$]
-    |   '"' { !(_input.LA(1) == '"' && _input.LA(2) == '"') }?
-    |   EscapeSequence
-    ;
-
-// character in the triple single quotation string. e.g. '''a'''
-fragment TsqStringCharacter
-    :   ~['\\]
-    |   '\'' { !(_input.LA(1) == '\'' && _input.LA(2) == '\'') }?
-    |   EscapeSequence
-    ;
-
-// character in the slashy string. e.g. /a/
-fragment SlashyStringCharacter
-    :   SlashEscape
-    |   '$' { !isFollowedByJavaLetterInGString(_input) }?
-    |   ~[/$\u0000]
-    ;
-
-// character in the collar slashy string. e.g. $/a/$
-fragment DollarSlashyStringCharacter
-    :   SlashEscape | DollarSlashEscape | DollarDollarEscape
-    |   '/' { _input.LA(1) != '$' }?
-    |   '$' { !isFollowedByJavaLetterInGString(_input) }?
-    |   ~[/$\u0000]
-    ;
-
-// Groovy keywords
-AS              : 'as';
-DEF             : 'def';
-IN              : 'in';
-TRAIT           : 'trait';
-
-
-// §3.9 Keywords
-BuiltInPrimitiveType
-    :   BOOLEAN
-    |   CHAR
-    |   BYTE
-    |   SHORT
-    |   INT
-    |   LONG
-    |   FLOAT
-    |   DOUBLE
-    ;
-
-ABSTRACT      : 'abstract';
-ASSERT        : 'assert';
-
-fragment
-BOOLEAN       : 'boolean';
-
-BREAK         : 'break';
-
-fragment
-BYTE          : 'byte';
-
-CASE          : 'case';
-CATCH         : 'catch';
-
-fragment
-CHAR          : 'char';
-
-CLASS         : 'class';
-CONST         : 'const';
-CONTINUE      : 'continue';
-DEFAULT       : 'default';
-DO            : 'do';
-
-fragment
-DOUBLE        : 'double';
-
-ELSE          : 'else';
-ENUM          : 'enum';
-EXTENDS       : 'extends';
-FINAL         : 'final';
-FINALLY       : 'finally';
-
-fragment
-FLOAT         : 'float';
-
-
-FOR           : 'for';
-IF            : 'if';
-GOTO          : 'goto';
-IMPLEMENTS    : 'implements';
-IMPORT        : 'import';
-INSTANCEOF    : 'instanceof';
-
-fragment
-INT           : 'int';
-
-INTERFACE     : 'interface';
-
-fragment
-LONG          : 'long';
-
-NATIVE        : 'native';
-NEW           : 'new';
-PACKAGE       : 'package';
-PRIVATE       : 'private';
-PROTECTED     : 'protected';
-PUBLIC        : 'public';
-RETURN        : 'return';
-
-fragment
-SHORT         : 'short';
-
-
-STATIC        : 'static';
-STRICTFP      : 'strictfp';
-SUPER         : 'super';
-SWITCH        : 'switch';
-SYNCHRONIZED  : 'synchronized';
-THIS          : 'this';
-THROW         : 'throw';
-THROWS        : 'throws';
-TRANSIENT     : 'transient';
-TRY           : 'try';
-VOID          : 'void';
-VOLATILE      : 'volatile';
-WHILE         : 'while';
-
-
-// §3.10.1 Integer Literals
-
-IntegerLiteral
-    :   DecimalIntegerLiteral
-    |   HexIntegerLiteral
-    |   OctalIntegerLiteral
-    |   BinaryIntegerLiteral
-    ;
-
-fragment
-DecimalIntegerLiteral
-    :   DecimalNumeral IntegerTypeSuffix?
-    ;
-
-fragment
-HexIntegerLiteral
-    :   HexNumeral IntegerTypeSuffix?
-    ;
-
-fragment
-OctalIntegerLiteral
-    :   OctalNumeral IntegerTypeSuffix?
-    ;
-
-fragment
-BinaryIntegerLiteral
-    :   BinaryNumeral IntegerTypeSuffix?
-    ;
-
-fragment
-IntegerTypeSuffix
-    :   [lLiIgG]
-    ;
-
-fragment
-DecimalNumeral
-    :   '0'
-    |   NonZeroDigit (Digits? | Underscores Digits)
-    ;
-
-fragment
-Digits
-    :   Digit (DigitOrUnderscore* Digit)?
-    ;
-
-fragment
-Digit
-    :   '0'
-    |   NonZeroDigit
-    ;
-
-fragment
-NonZeroDigit
-    :   [1-9]
-    ;
-
-fragment
-DigitOrUnderscore
-    :   Digit
-    |   '_'
-    ;
-
-fragment
-Underscores
-    :   '_'+
-    ;
-
-fragment
-HexNumeral
-    :   '0' [xX] HexDigits
-    ;
-
-fragment
-HexDigits
-    :   HexDigit (HexDigitOrUnderscore* HexDigit)?
-    ;
-
-fragment
-HexDigit
-    :   [0-9a-fA-F]
-    ;
-
-fragment
-HexDigitOrUnderscore
-    :   HexDigit
-    |   '_'
-    ;
-
-fragment
-OctalNumeral
-    :   '0' Underscores? OctalDigits
-    ;
-
-fragment
-OctalDigits
-    :   OctalDigit (OctalDigitOrUnderscore* OctalDigit)?
-    ;
-
-fragment
-OctalDigit
-    :   [0-7]
-    ;
-
-fragment
-OctalDigitOrUnderscore
-    :   OctalDigit
-    |   '_'
-    ;
-
-fragment
-BinaryNumeral
-    :   '0' [bB] BinaryDigits
-    ;
-
-fragment
-BinaryDigits
-    :   BinaryDigit (BinaryDigitOrUnderscore* BinaryDigit)?
-    ;
-
-fragment
-BinaryDigit
-    :   [01]
-    ;
-
-fragment
-BinaryDigitOrUnderscore
-    :   BinaryDigit
-    |   '_'
-    ;
-
-// §3.10.2 Floating-Point Literals
-
-FloatingPointLiteral
-    :   DecimalFloatingPointLiteral
-    |   HexadecimalFloatingPointLiteral
-    ;
-
-fragment
-DecimalFloatingPointLiteral
-    :   Digits '.' Digits ExponentPart? FloatTypeSuffix?
-    |   Digits ExponentPart FloatTypeSuffix?
-    |   Digits FloatTypeSuffix
-    ;
-
-fragment
-ExponentPart
-    :   ExponentIndicator SignedInteger
-    ;
-
-fragment
-ExponentIndicator
-    :   [eE]
-    ;
-
-fragment
-SignedInteger
-    :   Sign? Digits
-    ;
-
-fragment
-Sign
-    :   [+-]
-    ;
-
-fragment
-FloatTypeSuffix
-    :   [fFdDgG]
-    ;
-
-fragment
-HexadecimalFloatingPointLiteral
-    :   HexSignificand BinaryExponent FloatTypeSuffix?
-    ;
-
-fragment
-HexSignificand
-    :   HexNumeral '.'?
-    |   '0' [xX] HexDigits? '.' HexDigits
-    ;
-
-fragment
-BinaryExponent
-    :   BinaryExponentIndicator SignedInteger
-    ;
-
-fragment
-BinaryExponentIndicator
-    :   [pP]
-    ;
-
-// §3.10.3 Boolean Literals
-
-BooleanLiteral
-    :   'true'
-    |   'false'
-    ;
-
-
-// §3.10.6 Escape Sequences for Character and String Literals
-
-fragment
-EscapeSequence
-    :   '\\' [btnfr"'\\]
-    |   OctalEscape
-    |   UnicodeEscape
-    |   DollarEscape
-    |   LineEscape
-    ;
-
-
-fragment
-OctalEscape
-    :   '\\' OctalDigit
-    |   '\\' OctalDigit OctalDigit
-    |   '\\' ZeroToThree OctalDigit OctalDigit
-    ;
-
-// Groovy allows 1 or more u's after the backslash
-fragment
-UnicodeEscape
-    :   '\\' 'u'+ HexDigit HexDigit HexDigit HexDigit
-    ;
-
-fragment
-ZeroToThree
-    :   [0-3]
-    ;
-
-// Groovy Escape Sequences
-
-fragment
-DollarEscape
-    :   '\\' DOLLAR
-    ;
-
-fragment
-LineEscape
-    :   '\\' '\r'? '\n'
-    ;
-
-fragment
-SlashEscape
-    :   '\\' '/'
-    ;
-
-fragment
-DollarSlashEscape
-    :   '$/$'
-    ;
-
-fragment
-DollarDollarEscape
-    :   '$$'
-    ;
-// §3.10.7 The Null Literal
-
-NullLiteral
-    :   'null'
-    ;
-
-// Groovy Operators
-
-RANGE_INCLUSIVE     : '..';
-RANGE_EXCLUSIVE     : '..<';
-SPREAD_DOT          : '*.';
-SAFE_DOT            : '?.';
-ELVIS               : '?:';
-METHOD_POINTER      : '.&';
-METHOD_REFERENCE    : '::';
-REGEX_FIND          : '=~';
-REGEX_MATCH         : '==~';
-POWER               : '**';
-POWER_ASSIGN        : '**=';
-SPACESHIP           : '<=>';
-IDENTICAL           : '===';
-NOT_IDENTICAL       : '!==';
-ARROW               : '->';
-
-// !internalPromise will be parsed as !in ternalPromise, so semantic predicates are necessary
-NOT_INSTANCEOF      : '!instanceof' { isFollowedBy(_input, ' ', '\t', '\r', '\n') }?;
-NOT_IN              : '!in'         { isFollowedBy(_input, ' ', '\t', '\r', '\n', '[', '(', '{') }?;
-
-fragment
-DOLLAR              : '$';
-
-
-// §3.11 Separators
-
-LPAREN          : '('  { this.enterParen();     } -> pushMode(DEFAULT_MODE);
-RPAREN          : ')'  { this.exitParen();      } -> popMode;
-LBRACE          : '{'  { this.enterParen();     } -> pushMode(DEFAULT_MODE);
-RBRACE          : '}'  { this.exitParen();      } -> popMode;
-LBRACK          : '['  { this.enterParen();     } -> pushMode(DEFAULT_MODE);
-RBRACK          : ']'  { this.exitParen();      } -> popMode;
-
-SEMI            : ';';
-COMMA           : ',';
-DOT             : '.';
-
-// §3.12 Operators
-
-ASSIGN          : '=';
-GT              : '>';
-LT              : '<';
-NOT             : '!';
-BITNOT          : '~';
-QUESTION        : '?';
-COLON           : ':';
-EQUAL           : '==';
-LE              : '<=';
-GE              : '>=';
-NOTEQUAL        : '!=';
-AND             : '&&';
-OR              : '||';
-INC             : '++';
-DEC             : '--';
-ADD             : '+';
-SUB             : '-';
-MUL             : '*';
-DIV             : '/';
-BITAND          : '&';
-BITOR           : '|';
-XOR             : '^';
-MOD             : '%';
-
-
-ADD_ASSIGN      : '+=';
-SUB_ASSIGN      : '-=';
-MUL_ASSIGN      : '*=';
-DIV_ASSIGN      : '/=';
-AND_ASSIGN      : '&=';
-OR_ASSIGN       : '|=';
-XOR_ASSIGN      : '^=';
-MOD_ASSIGN      : '%=';
-LSHIFT_ASSIGN   : '<<=';
-RSHIFT_ASSIGN   : '>>=';
-URSHIFT_ASSIGN  : '>>>=';
-ELVIS_ASSIGN    : '?=';
-
-
-// §3.8 Identifiers (must appear after all keywords in the grammar)
-CapitalizedIdentifier
-    :   [A-Z] JavaLetterOrDigit*
-
-    // FIXME REMOVE THE FOLLOWING ALTERNATIVE. Groovy's identifier can be unicode escape(e.g. def \u4e00\u9fa5 = '123'), which will impact the performance and is pointless to support IMO
-    |   [A-Z] (JavaLetterOrDigit | UnicodeEscape)*
-    ;
-
-Identifier
-    :   JavaLetter JavaLetterOrDigit*
-
-    // FIXME REMOVE THE FOLLOWING ALTERNATIVE. Groovy's identifier can be unicode escape(e.g. def \u4e00\u9fa5 = '123'), which will impact the performance and is pointless to support IMO
-    |   (JavaLetter | UnicodeEscape) (JavaLetterOrDigit | UnicodeEscape)*
-    ;
-
-fragment
-IdentifierInGString
-    :   JavaLetterInGString JavaLetterOrDigitInGString*
-    ;
-
-fragment
-JavaLetterInGString
-    :   [a-zA-Z_] // these are the "java letters" below 0x7F, except for $
-    |   // covers all characters above 0x7F which are not a surrogate
-        ~[\u0000-\u007F\uD800-\uDBFF]
-        {Character.isJavaIdentifierStart(_input.LA(-1))}?
-    |   // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
-        [\uD800-\uDBFF] [\uDC00-\uDFFF]
-        {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
-    ;
-
-fragment
-JavaLetterOrDigitInGString
-    :   [a-zA-Z0-9_] // these are the "java letters or digits" below 0x7F, except for $
-    |   // covers all characters above 0x7F which are not a surrogate
-        ~[\u0000-\u007F\uD800-\uDBFF]
-        {Character.isJavaIdentifierPart(_input.LA(-1))}?
-    |   // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
-        [\uD800-\uDBFF] [\uDC00-\uDFFF]
-        {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
-    ;
-
-
-fragment
-JavaLetter
-    :   [a-zA-Z$_] // these are the "java letters" below 0x7F
-    |   // covers all characters above 0x7F which are not a surrogate
-        ~[\u0000-\u007F\uD800-\uDBFF]
-        {Character.isJavaIdentifierStart(_input.LA(-1))}?
-    |   // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
-        [\uD800-\uDBFF] [\uDC00-\uDFFF]
-        {Character.isJavaIdentifierStart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
-    ;
-
-fragment
-JavaLetterOrDigit
-    :   [a-zA-Z0-9$_] // these are the "java letters or digits" below 0x7F
-    |   // covers all characters above 0x7F which are not a surrogate
-        ~[\u0000-\u007F\uD800-\uDBFF]
-        {Character.isJavaIdentifierPart(_input.LA(-1))}?
-    |   // covers UTF-16 surrogate pairs encodings for U+10000 to U+10FFFF
-        [\uD800-\uDBFF] [\uDC00-\uDFFF]
-        {Character.isJavaIdentifierPart(Character.toCodePoint((char)_input.LA(-2), (char)_input.LA(-1)))}?
-    ;
-
-//
-// Additional symbols not defined in the lexical specification
-//
-
-AT : '@';
-ELLIPSIS : '...';
-
-//
-// Whitespace, line escape and comments
-//
-WS  :  ([ \t\u000C]+ | LineEscape+)     -> skip
-    ;
-
-
-// Inside (...) and [...] but not {...}, ignore newlines.
-NL  : '\r'? '\n'            { this.ignoreTokenInsideParens(); }
-    ;
-
-// Multiple-line comments(including groovydoc comments)
-ML_COMMENT
-    :   '/*' .*? '*/'       { this.ignoreMultiLineCommentConditionally(); } -> type(NL)
-    ;
-
-// Single-line comments
-SL_COMMENT
-    :   '//' ~[\r\n\uFFFF]* { this.ignoreTokenInsideParens(); }             -> type(NL)
-    ;
-
-// Script-header comments.
-// The very first characters of the file may be "#!".  If so, ignore the first line.
-SH_COMMENT
-    :   '#!' { 0 == this.tokenIndex }?<fail={"Shebang comment should appear at the first line"}> ~[\r\n\uFFFF]* -> skip
-    ;
-
-// Unexpected characters will be handled by groovy parser later.
-UNEXPECTED_CHAR
-    :   .
-    ;