You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/10/27 03:28:52 UTC

[lucy-commits] svn commit: r1189569 - /incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l

Author: marvin
Date: Thu Oct 27 01:28:52 2011
New Revision: 1189569

URL: http://svn.apache.org/viewvc?rev=1189569&view=rev
Log:
Improve lexing of numeric literals.

Modified:
    incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l

Modified: incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l
URL: http://svn.apache.org/viewvc/incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l?rev=1189569&r1=1189568&r2=1189569&view=diff
==============================================================================
--- incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l (original)
+++ incubator/lucy/branches/clownfish_lemon/clownfish/src/CFCLexHeader.l Thu Oct 27 01:28:52 2011
@@ -89,8 +89,8 @@ final      { PARSE(CFC_TOKENTYPE_FINAL);
 =          { PARSE(CFC_TOKENTYPE_EQUALS); }
 
 -?0x[0-9A-Fa-f]+       { PARSE(CFC_TOKENTYPE_HEX_LITERAL); }
+-?[0-9]+\.[0-9]+       { PARSE(CFC_TOKENTYPE_FLOAT_LITERAL); }
 -?[0-9]+               { PARSE(CFC_TOKENTYPE_INTEGER_LITERAL); }
--?[ ]*[0-9+].[0-9]+    { PARSE(CFC_TOKENTYPE_FLOAT_LITERAL); }
 \"([^\"\\]|\\.)*\"     { PARSE(CFC_TOKENTYPE_STRING_LITERAL); }
 
 [a-zA-Z_][a-zA-Z0-9_]* { PARSE(CFC_TOKENTYPE_IDENTIFIER); }