Repository: groovy
Updated Branches:
  refs/heads/master e4d20341c -> 14ae52247


Minor refactoring


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

Branch: refs/heads/master
Commit: 14ae522479c7f2bd606ebfd5a6dd8705b24b659c
Parents: e4d2034
Author: sunlan <[email protected]>
Authored: Sat Jul 8 11:46:16 2017 +0800
Committer: sunlan <[email protected]>
Committed: Sat Jul 8 11:46:16 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/14ae5224/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