Treat colons and commas as end of input in expression parser
Just like a comment. This is to allow processing of lists
of numbers separated by colons or commas. Also, fix the comment
processing to require zero rather than one character after '#'
Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/exp/expression-parser.l b/exp/expression-parser.l
index bb80553..c084db6 100644
--- a/exp/expression-parser.l
+++ b/exp/expression-parser.l
@@ -109,7 +109,7 @@
return SUFFIX;
}
[ \t] ; /* ignore whitespace */
-#.+ ; /* ignore comments */
+[#:,].* ; /* ignore comments, and everything after colons and commas */
[0-9]*[.][0-9]+ {
int rc;
double dval;