F #2456 Escape "$" at VM templates (#2529)

This commit is contained in:
Christian González authored and Ruben S. Montero committed 2018-10-22 17:38:05 +02:00
1 parent 8a39633987
commit 9182eee770
1 file changed
+6 -7
+6 -7
View File
@@ -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 @@
<VAR><<EOF>> { 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)