put comment-stripping in the grammar so #-strings don't get borked

This commit is contained in:
John Kerl 2016-10-13 21:31:39 -04:00
parent cb860e61e0
commit a5ce769cf7
3 changed files with 8 additions and 1 deletions

View file

@ -491,6 +491,8 @@ false {
return MD_TOKEN_COMMA;
}
#.*\n { }
[ \t\r\n] { }
. {

View file

@ -343,7 +343,8 @@ static mapper_t* shared_parse_cli(int* pargi, int argc, char** argv,
slls_free(expression_filenames);
slls_free(expression_strings);
comment_stripped_mlr_dsl_expression = alloc_comment_strip(mlr_dsl_expression);
//comment_stripped_mlr_dsl_expression = alloc_comment_strip(mlr_dsl_expression);
comment_stripped_mlr_dsl_expression = mlr_strdup_or_die(mlr_dsl_expression);
// Linked list of mlr_dsl_ast_node_t*.
mlr_dsl_ast_t* past = mlr_dsl_parse(comment_stripped_mlr_dsl_expression, trace_parse);

View file

@ -24,6 +24,10 @@ MISC:
* oosvar-single-for mlh
* oosvar-single-for mld
* try # at grammar? try not to get strip-outs from strings.
* gonna wanna pass maps to funcs/subrs ...... and return them too. syntax = ? val/map type-keywords?
----------------------------------------------------------------
5.0.0: