t/dedupe: avoid div-by-zero for all identical chunks
[fio.git] / exp / expression-parser.l
index c084db6a1885786f84a015c726ebf8b870eaa06b..7d5e787dd9748bceebaa747ffcbe4edc37f9c2fc 100644 (file)
@@ -31,7 +31,7 @@ extern int lexer_input(char* buffer, int *nbytes, int buffersize);
                lexer_input((buffer), &(bytes_read), (bytes_requested))
 
 extern int yyerror(long long *result, double *dresult,
-               int *has_error, int *bye, const char *msg);
+               int *has_error, int *units_specified, const char *msg);
 
 static void __attribute__((unused)) yyunput(int c,char *buf_ptr);
 static int __attribute__((unused)) input(void);
@@ -47,7 +47,6 @@ static int __attribute__((unused)) input(void);
 %%
 
 
-bye            return BYE;
 [kK]|[kK][bB]  {
                        set_suffix_value(yylval, 1024, 1024.0, 0);
                        return SUFFIX;
@@ -110,7 +109,7 @@ bye         return BYE;
                }
 [ \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;