From 8e1bdeda92e1414e312406e7169caf40ad48308b Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Sat, 7 Nov 2020 19:54:25 -0800 Subject: [PATCH] Resolve shfit/reduce conflict in timespec production (#54) Resolve shfit/reduce conflict in timespec production (no operational change) --- ircd/ircd_parser.y | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index fa8dd3df..4f6a592e 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -170,7 +170,7 @@ static void add_cur_list(int type, char *str, int number) %token NUMBER %type qstring string -%type number timespec +%type number timespec unittimespec %type oneitem single itemlist %start conf @@ -308,7 +308,7 @@ qstring: QSTRING { strcpy($$, $1); } ; string: STRING { strcpy($$, $1); } ; number: NUMBER { $$ = $1; } ; -timespec: number string +unittimespec: number string { time_t t; @@ -320,7 +320,13 @@ timespec: number string $$ = $1 * t; } - | timespec timespec + ; + +timespec: unittimespec + { + $$ = $1; + } + | timespec unittimespec { $$ = $1 + $2; }