From 067c61451c975f9dc4c8a6fb16e823cdd17b71f6 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Mon, 11 Mar 2019 10:05:43 +0000 Subject: [PATCH] libpakfire: parser: Do not allow words to be empty (removes a shift/reduce error) Signed-off-by: Michael Tremer --- src/libpakfire/parser/grammar.y | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.39.5