Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X d858f87fb -> a928fb987


Minor refactoring

(cherry picked from commit 14ae522)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: a928fb987e885e62ccd383803011b9efe79788b9
Parents: d858f87
Author: sunlan <[email protected]>
Authored: Sat Jul 8 11:46:16 2017 +0800
Committer: sunlan <[email protected]>
Committed: Sat Jul 8 11:47:48 2017 +0800

----------------------------------------------------------------------
 .../org/apache/groovy/parser/antlr4/GroovyLexer.g4   | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/a928fb98/subprojects/parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
----------------------------------------------------------------------
diff --git 
a/subprojects/parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
 
b/subprojects/parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
index bc7131c..80192e3 100644
--- 
a/subprojects/parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
+++ 
b/subprojects/parser-antlr4/src/main/antlr4/org/apache/groovy/parser/antlr4/GroovyLexer.g4
@@ -500,12 +500,17 @@ NonZeroDigit
 fragment
 DigitOrUnderscore
     :   Digit
-    |   '_'
+    |   Underscore
     ;
 
 fragment
 Underscores
-    :   '_'+
+    :   Underscore+
+    ;
+
+fragment
+Underscore
+    :   '_'
     ;
 
 fragment
@@ -526,7 +531,7 @@ HexDigit
 fragment
 HexDigitOrUnderscore
     :   HexDigit
-    |   '_'
+    |   Underscore
     ;
 
 fragment
@@ -547,7 +552,7 @@ OctalDigit
 fragment
 OctalDigitOrUnderscore
     :   OctalDigit
-    |   '_'
+    |   Underscore
     ;
 
 fragment
@@ -568,7 +573,7 @@ BinaryDigit
 fragment
 BinaryDigitOrUnderscore
     :   BinaryDigit
-    |   '_'
+    |   Underscore
     ;
 
 // §3.10.2 Floating-Point Literals

Reply via email to