From: Paul Eggert Date: Sun, 6 Jun 2004 18:55:59 +0000 (+0000) Subject: * getdate.y (yylex): Allow space between sign and number. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e90f3dea7e8cab27e118fda5404b8da052e25e36;p=pspp * getdate.y (yylex): Allow space between sign and number. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 32b69d2243..ce8dbf26cf 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2004-06-06 Paul Eggert + + * getdate.y (yylex): Allow space between sign and number. + Problem reported by Dan Jacobson. + 2004-06-01 Paul Eggert and Jim Meyering diff --git a/lib/getdate.y b/lib/getdate.y index 52ed8530ba..5784b6ccdc 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -844,7 +844,8 @@ yylex (YYSTYPE *lvalp, parser_control *pc) if (c == '-' || c == '+') { sign = c == '-' ? -1 : 1; - c = *++pc->input; + while (c = *++pc->input, ISSPACE (c)) + continue; if (! ISDIGIT (c)) /* skip the '-' sign */ continue;