Add support to the parser to recognize floating point constants


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AsmParser/Lexer.l b/lib/AsmParser/Lexer.l
index 91fc1b6..e966de1 100644
--- a/lib/AsmParser/Lexer.l
+++ b/lib/AsmParser/Lexer.l
@@ -80,6 +80,10 @@
 PInteger   [0-9]+
 NInteger  -[0-9]+
 
+/* FPConstant - A Floating point constant.
+   TODO: Expand lexer to support 10e50 FP constant notation */
+FPConstant [0-9]+[.][0-9]*
+
 %%
 
 {Comment}       { /* Ignore comments for now */ }
@@ -181,6 +185,7 @@
 		  return SINTVAL;
                 }
 
+{FPConstant}    { llvmAsmlval.FPVal = atof(yytext); return FPVAL; }
 
 [ \t\n]         { /* Ignore whitespace */ }
 .               { /*printf("'%s'", yytext);*/ return yytext[0]; }