Treat colons and commas as end of input in expression parser
authorStephen M. Cameron <stephenmcameron@gmail.com>
Tue, 30 Sep 2014 13:44:24 +0000 (08:44 -0500)
committerJens Axboe <axboe@fb.com>
Tue, 30 Sep 2014 16:41:38 +0000 (10:41 -0600)
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>
exp/expression-parser.l

index bb80553ee40349a1ec596f0c7c66142c4b2e365c..c084db6a1885786f84a015c726ebf8b870eaa06b 100644 (file)
@@ -109,7 +109,7 @@ bye         return BYE;
                        return SUFFIX;
                }
 [ \t] ; /* ignore whitespace */
                        return SUFFIX;
                }
 [ \t] ; /* ignore whitespace */
-#.+ ; /* ignore comments */
+[#:,].* ; /* ignore comments, and everything after colons and commas */
 [0-9]*[.][0-9]+ {
                        int rc;
                        double dval;
 [0-9]*[.][0-9]+ {
                        int rc;
                        double dval;