From: Michael Tremer Date: Thu, 14 Mar 2019 13:51:02 +0000 (+0000) Subject: libpakfire: parser: Remove quotes around quoted strings X-Git-Tag: 0.9.28~1285^2~1055 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7575d9e3cffa51730d4251663dc3920acce31c8;p=pakfire.git libpakfire: parser: Remove quotes around quoted strings Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/parser/scanner.l b/src/libpakfire/parser/scanner.l index bd77566ee..6af066870 100644 --- a/src/libpakfire/parser/scanner.l +++ b/src/libpakfire/parser/scanner.l @@ -54,6 +54,15 @@ word ({quoted_string}|({digit}|{letter}|{special})+) "def" { return DEFINE; } "end" { return END; } +{quoted_string} { + // Remove quotes + size_t len = strlen(yytext); + yytext[len-1] = '\0'; + + yylval.string = pakfire_strdup(yytext + 1); + return WORD; + } + {word} { yylval.string = pakfire_strdup(yytext); return WORD;