diff --git a/src/parsers/vm_var_parser.l b/src/parsers/vm_var_parser.l index c70a15eece..b683a1784d 100644 --- a/src/parsers/vm_var_parser.l +++ b/src/parsers/vm_var_parser.l @@ -46,6 +46,12 @@ %x VALUE %% + /* ------------------------------------------------------------------------- */ + /* Just copy the string verbatim till we find a variable (starts with $) */ + /* ------------------------------------------------------------------------- */ + +([^\$\\]|"\\\$"|\\[^\$])+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;} + /* ------------------------------------------------------------------------- */ /* Parse variables in the form: */ /* $VARIABLE */ @@ -86,13 +92,6 @@ <> { yylval_param->val_char = '\0'; BEGIN(INITIAL); return EOA;} - - /* ------------------------------------------------------------------------- */ - /* Just copy the string verbatim till we find a variable (starts with $) */ - /* ------------------------------------------------------------------------- */ - -[^\$]+ { yylval_param->val_str = mem_collector_strdup(mc,yytext); return RSTRING;} - %% int vm_var_wrap(yyscan_t scanner)