X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=exp%2Fexpression-parser.l;h=7d5e787dd9748bceebaa747ffcbe4edc37f9c2fc;hb=15e3ca5b72b03f485abdda06bee9a9458dbd26a5;hp=bb80553ee40349a1ec596f0c7c66142c4b2e365c;hpb=96106472fa3a9fb161b1114673da80eff23a36a3;p=fio.git diff --git a/exp/expression-parser.l b/exp/expression-parser.l index bb80553e..7d5e787d 100644 --- a/exp/expression-parser.l +++ b/exp/expression-parser.l @@ -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; @@ -109,8 +108,8 @@ bye return BYE; return SUFFIX; } [ \t] ; /* ignore whitespace */ -#.+ ; /* ignore comments */ -[0-9]*[.][0-9]+ { +[#:,].* ; /* ignore comments, and everything after colons and commas */ +[0-9]*[.][0-9]+|[0-9]*[.]?[0-9]+[eE][-+]*[0-9]+ { int rc; double dval;