From: Michael Tremer Date: Mon, 11 Mar 2019 10:05:43 +0000 (+0000) Subject: libpakfire: parser: Do not allow words to be empty (removes a shift/reduce error) X-Git-Tag: 0.9.28~1285^2~1083 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067c61451c975f9dc4c8a6fb16e823cdd17b71f6;p=pakfire.git libpakfire: parser: Do not allow words to be empty (removes a shift/reduce error) Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/parser/grammar.y b/src/libpakfire/parser/grammar.y index 0288a9c09..af0fadccc 100644 --- a/src/libpakfire/parser/grammar.y +++ b/src/libpakfire/parser/grammar.y @@ -112,16 +112,15 @@ words : WORD ERROR(pakfire, "Could not allocate memory"); ABORT; } - } - | /* empty */ - { - $$ = NULL; }; line : whitespace words NEWLINE { // Only forward words $$ = $2; + } + | whitespace NEWLINE { + $$ = NULL; }; text : text line