]> jfr.im git - irc/freenode/solanum.git/commitdiff
Resolve shfit/reduce conflict in timespec production (#54)
authorEric Mertens <redacted>
Sun, 8 Nov 2020 03:54:25 +0000 (19:54 -0800)
committerGitHub <redacted>
Sun, 8 Nov 2020 03:54:25 +0000 (19:54 -0800)
Resolve shfit/reduce conflict in timespec production (no operational change)

ircd/ircd_parser.y

index fa8dd3dfb7f5d191bc893558ae91a9cc4271d8c6..4f6a592edf6ba47b61b5c8d720b6b68415565d24 100644 (file)
@@ -170,7 +170,7 @@ static void add_cur_list(int type, char *str, int number)
 %token <number> NUMBER
 
 %type <string> qstring string
-%type <number> number timespec
+%type <number> number timespec unittimespec
 %type <conf_parm> 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;
                }