X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetdate.y;h=44f2e19c28aaf30d485f87ac3a21a8b0a17157cf;hb=27cdfa27fdd803212e2cb88148fb578c9312a85f;hp=d33fa0630f2d6f05259a4c7bd42439915320799c;hpb=07b2c33202d136eec120e54d640237e3ecd88fdb;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index d33fa0630..44f2e19c2 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -3,7 +3,7 @@ ** Originally written by Steven M. Bellovin while ** at the University of North Carolina at Chapel Hill. Later tweaked by ** a couple of people on Usenet. Completely overhauled by Rich $alz -** and Jim Berets in August, 1990; +** and Jim Berets in August, 1990. ** ** This grammar has 13 shift/reduce conflicts. ** @@ -347,7 +347,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelYear += $1 * $2; } | tYEAR_UNIT { - yyRelYear++; + yyRelYear += $1; } | tUNUMBER tMONTH_UNIT { yyRelMonth += $1 * $2; @@ -356,7 +356,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelMonth += $1 * $2; } | tMONTH_UNIT { - yyRelMonth++; + yyRelMonth += $1; } | tUNUMBER tDAY_UNIT { yyRelDay += $1 * $2; @@ -365,7 +365,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelDay += $1 * $2; } | tDAY_UNIT { - yyRelDay++; + yyRelDay += $1; } | tUNUMBER tHOUR_UNIT { yyRelHour += $1 * $2; @@ -374,7 +374,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelHour += $1 * $2; } | tHOUR_UNIT { - yyRelHour++; + yyRelHour += $1; } | tUNUMBER tMINUTE_UNIT { yyRelMinutes += $1 * $2; @@ -383,7 +383,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelMinutes += $1 * $2; } | tMINUTE_UNIT { - yyRelMinutes++; + yyRelMinutes += $1; } | tUNUMBER tSEC_UNIT { yyRelSeconds += $1 * $2; @@ -392,7 +392,7 @@ relunit : tUNUMBER tYEAR_UNIT { yyRelSeconds += $1 * $2; } | tSEC_UNIT { - yyRelSeconds++; + yyRelSeconds += $1; } ; @@ -493,7 +493,7 @@ static TABLE const OtherTable[] = { { "now", tMINUTE_UNIT, 0 }, { "last", tUNUMBER, -1 }, { "this", tMINUTE_UNIT, 0 }, - { "next", tUNUMBER, 2 }, + { "next", tUNUMBER, 1 }, { "first", tUNUMBER, 1 }, /* { "second", tUNUMBER, 2 }, */ { "third", tUNUMBER, 3 },