Title: [1253] trunk/qdox/src/grammar/lexer.flex: Change [0-9]+ to {DecimalNumeral} to support underscores in numbers
Revision
1253
Author
rfscholte
Date
2011-05-28 10:40:50 -0500 (Sat, 28 May 2011)

Log Message

Change [0-9]+ to {DecimalNumeral} to support underscores in numbers

Modified Paths


Diff

Modified: trunk/qdox/src/grammar/lexer.flex (1252 => 1253)

--- trunk/qdox/src/grammar/lexer.flex	2011-05-28 14:52:24 UTC (rev 1252)
+++ trunk/qdox/src/grammar/lexer.flex	2011-05-28 15:40:50 UTC (rev 1253)
@@ -133,13 +133,13 @@
 OctalNumeral                    = ( "0" [_0-7]* [0-7] )
 BinaryNumeral                   = ( "0" [bB] ( [01] | [01] [_01]* [01] ) )
 IntegerLiteral			        = ( {DecimalNumeral} | {BinaryNumeral} | {HexNumeral} | {OctalNumeral} ) ([lL])?
-Exponent				        = [eE] [+-]? ([0-9])+
+Exponent				        = [eE] [+-]? {DecimalNumeral}
 FloatingPointLiteral            = ( {DecimalFloatingPointLiteral} | {HexadecimalFloatingPointLiteral} )
-DecimalFloatingPointLiteral	    = ( [0-9]+ ("." [0-9]+)? ({Exponent})? ([dDfF])? ) |
-						          ( "." [0-9]+ ({Exponent})? ([dDfF])?) |
-						          ( ([0-9])+ {Exponent} ([dDfF])?) |
-						          ( ([0-9])+ ({Exponent} )? ([dDfF]) )
-BinaryExponent                  = [pP] [+-]? ([0-9])+					          
+DecimalFloatingPointLiteral	    = ( {DecimalNumeral} ("." {DecimalNumeral})? ({Exponent})? ([dDfF])? ) |
+						          ( "." {DecimalNumeral} ({Exponent})? ([dDfF])?) |
+						          ( {DecimalNumeral} {Exponent} ([dDfF])?) |
+						          ( {DecimalNumeral} ({Exponent} )? ([dDfF]) )
+BinaryExponent                  = [pP] [+-]? ({DecimalNumeral})+					          
 HexSignificand                  = ( {HexNumeral} "."? ) |
                                   ( "0" [xX] ( {HexDigits} )? "." ( {HexDigits} ) )
 HexadecimalFloatingPointLiteral = {HexSignificand} {BinaryExponent} ([dDfF])?


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to