make expression parser handle scientific notation
authorStephen M. Cameron <stephenmcameron@gmail.com>
Fri, 3 Oct 2014 01:31:11 +0000 (20:31 -0500)
committerJens Axboe <axboe@fb.com>
Fri, 3 Oct 2014 14:13:34 +0000 (08:13 -0600)
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
exp/expression-parser.l

index 11eb833063993e531b08cc069fd08bdaf532808d..7d5e787dd9748bceebaa747ffcbe4edc37f9c2fc 100644 (file)
@@ -109,7 +109,7 @@ static int __attribute__((unused)) input(void);
                }
 [ \t] ; /* ignore whitespace */
 [#:,].* ; /* ignore comments, and everything after colons and commas */
                }
 [ \t] ; /* ignore whitespace */
 [#:,].* ; /* ignore comments, and everything after colons and commas */
-[0-9]*[.][0-9]+ {
+[0-9]*[.][0-9]+|[0-9]*[.]?[0-9]+[eE][-+]*[0-9]+ {
                        int rc;
                        double dval;
 
                        int rc;
                        double dval;