Merge branch 'PHP-8.2'

This commit is contained in:
Derick Rethans 2022-12-01 11:11:42 +00:00
commit 853e9caaa3
3 changed files with 108 additions and 105 deletions

View file

@ -1,4 +1,4 @@
/* Generated by re2c 0.15.3 on Wed Nov 30 15:57:27 2022 */
/* Generated by re2c 0.15.3 on Thu Dec 1 10:59:46 2022 */
#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
@ -782,10 +782,11 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
timelib_long value = 0;
const timelib_tz_lookup_table *tp;
/* Only include A-Z, a-z, /, _, and - in abbreviations/TZ IDs */
/* Only include A-Z, a-z, 0-9, /, _, and - in abbreviations/TZ IDs */
while (
(**ptr >= 'A' && **ptr <= 'Z') ||
(**ptr >= 'a' && **ptr <= 'z') ||
(**ptr >= '0' && **ptr <= '9') ||
**ptr == '/' || **ptr == '_' || **ptr == '-'
) {
++*ptr;
@ -983,11 +984,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper)
std:
s->tok = cursor;
s->len = 0;
#line 1114 "ext/date/lib/parse_date.re"
#line 1115 "ext/date/lib/parse_date.re"
#line 991 "<stdout>"
#line 992 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
@ -1125,7 +1126,7 @@ yy2:
}
yy3:
YYDEBUG(3, *YYCURSOR);
#line 1848 "ext/date/lib/parse_date.re"
#line 1849 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
@ -1138,7 +1139,7 @@ yy3:
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 1142 "<stdout>"
#line 1143 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@ -1445,12 +1446,12 @@ yy11:
if (yych <= '9') goto yy1483;
yy12:
YYDEBUG(12, *YYCURSOR);
#line 1943 "ext/date/lib/parse_date.re"
#line 1944 "ext/date/lib/parse_date.re"
{
add_error(s, TIMELIB_ERR_UNEXPECTED_CHARACTER, "Unexpected character");
goto std;
}
#line 1454 "<stdout>"
#line 1455 "<stdout>"
yy13:
YYDEBUG(13, *YYCURSOR);
yych = *++YYCURSOR;
@ -2694,11 +2695,11 @@ yy48:
if (yych <= '9') goto yy54;
yy49:
YYDEBUG(49, *YYCURSOR);
#line 1932 "ext/date/lib/parse_date.re"
#line 1933 "ext/date/lib/parse_date.re"
{
goto std;
}
#line 2702 "<stdout>"
#line 2703 "<stdout>"
yy50:
YYDEBUG(50, *YYCURSOR);
yych = *++YYCURSOR;
@ -2707,12 +2708,12 @@ yy51:
YYDEBUG(51, *YYCURSOR);
++YYCURSOR;
YYDEBUG(52, *YYCURSOR);
#line 1937 "ext/date/lib/parse_date.re"
#line 1938 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 2716 "<stdout>"
#line 2717 "<stdout>"
yy53:
YYDEBUG(53, *YYCURSOR);
yych = *++YYCURSOR;
@ -3134,7 +3135,7 @@ yy83:
if (yych == 's') goto yy85;
yy84:
YYDEBUG(84, *YYCURSOR);
#line 1916 "ext/date/lib/parse_date.re"
#line 1917 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
@ -3149,7 +3150,7 @@ yy84:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 3153 "<stdout>"
#line 3154 "<stdout>"
yy85:
YYDEBUG(85, *YYCURSOR);
yych = *++YYCURSOR;
@ -4158,7 +4159,7 @@ yy218:
}
yy219:
YYDEBUG(219, *YYCURSOR);
#line 1779 "ext/date/lib/parse_date.re"
#line 1780 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
@ -4175,7 +4176,7 @@ yy219:
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
#line 4179 "<stdout>"
#line 4180 "<stdout>"
yy220:
YYDEBUG(220, *YYCURSOR);
yych = *++YYCURSOR;
@ -4721,7 +4722,7 @@ yy247:
}
yy248:
YYDEBUG(248, *YYCURSOR);
#line 1838 "ext/date/lib/parse_date.re"
#line 1839 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
@ -4730,7 +4731,7 @@ yy248:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4734 "<stdout>"
#line 4735 "<stdout>"
yy249:
YYDEBUG(249, *YYCURSOR);
++YYCURSOR;
@ -4979,7 +4980,7 @@ yy261:
goto yy267;
yy262:
YYDEBUG(262, *YYCURSOR);
#line 1584 "ext/date/lib/parse_date.re"
#line 1585 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
@ -4992,7 +4993,7 @@ yy262:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4996 "<stdout>"
#line 4997 "<stdout>"
yy263:
YYDEBUG(263, *YYCURSOR);
yyaccept = 6;
@ -5119,7 +5120,7 @@ yy275:
}
yy276:
YYDEBUG(276, *YYCURSOR);
#line 1886 "ext/date/lib/parse_date.re"
#line 1887 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
@ -5148,7 +5149,7 @@ yy276:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5152 "<stdout>"
#line 5153 "<stdout>"
yy277:
YYDEBUG(277, *YYCURSOR);
yyaccept = 7;
@ -5446,7 +5447,7 @@ yy300:
YYDEBUG(300, *YYCURSOR);
++YYCURSOR;
YYDEBUG(301, *YYCURSOR);
#line 1862 "ext/date/lib/parse_date.re"
#line 1863 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
@ -5469,7 +5470,7 @@ yy300:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 5473 "<stdout>"
#line 5474 "<stdout>"
yy302:
YYDEBUG(302, *YYCURSOR);
yych = *++YYCURSOR;
@ -6147,7 +6148,7 @@ yy361:
YYDEBUG(362, *YYCURSOR);
++YYCURSOR;
YYDEBUG(363, *YYCURSOR);
#line 1556 "ext/date/lib/parse_date.re"
#line 1557 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
@ -6160,7 +6161,7 @@ yy361:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 6164 "<stdout>"
#line 6165 "<stdout>"
yy364:
YYDEBUG(364, *YYCURSOR);
yych = *++YYCURSOR;
@ -6391,7 +6392,7 @@ yy368:
if (yych <= '9') goto yy372;
yy371:
YYDEBUG(371, *YYCURSOR);
#line 1700 "ext/date/lib/parse_date.re"
#line 1701 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
@ -6404,7 +6405,7 @@ yy371:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 6408 "<stdout>"
#line 6409 "<stdout>"
yy372:
YYDEBUG(372, *YYCURSOR);
yych = *++YYCURSOR;
@ -6986,7 +6987,7 @@ yy397:
}
yy398:
YYDEBUG(398, *YYCURSOR);
#line 1758 "ext/date/lib/parse_date.re"
#line 1759 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
@ -7006,7 +7007,7 @@ yy398:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 7010 "<stdout>"
#line 7011 "<stdout>"
yy399:
YYDEBUG(399, *YYCURSOR);
yyaccept = 5;
@ -8795,7 +8796,7 @@ yy460:
++YYCURSOR;
yy461:
YYDEBUG(461, *YYCURSOR);
#line 1449 "ext/date/lib/parse_date.re"
#line 1450 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
@ -8806,7 +8807,7 @@ yy461:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 8810 "<stdout>"
#line 8811 "<stdout>"
yy462:
YYDEBUG(462, *YYCURSOR);
yych = *++YYCURSOR;
@ -8928,7 +8929,7 @@ yy484:
YYDEBUG(484, *YYCURSOR);
++YYCURSOR;
YYDEBUG(485, *YYCURSOR);
#line 1475 "ext/date/lib/parse_date.re"
#line 1476 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601datex");
TIMELIB_INIT;
@ -8939,7 +8940,7 @@ yy484:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 8943 "<stdout>"
#line 8944 "<stdout>"
yy486:
YYDEBUG(486, *YYCURSOR);
yyaccept = 1;
@ -9693,7 +9694,7 @@ yy508:
}
yy509:
YYDEBUG(509, *YYCURSOR);
#line 1598 "ext/date/lib/parse_date.re"
#line 1599 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
@ -9704,7 +9705,7 @@ yy509:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 9708 "<stdout>"
#line 9709 "<stdout>"
yy510:
YYDEBUG(510, *YYCURSOR);
yyaccept = 9;
@ -9845,7 +9846,7 @@ yy521:
YYDEBUG(521, *YYCURSOR);
++YYCURSOR;
YYDEBUG(522, *YYCURSOR);
#line 1302 "ext/date/lib/parse_date.re"
#line 1303 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
@ -9861,7 +9862,7 @@ yy521:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 9865 "<stdout>"
#line 9866 "<stdout>"
yy523:
YYDEBUG(523, *YYCURSOR);
yyaccept = 10;
@ -9874,7 +9875,7 @@ yy523:
}
yy524:
YYDEBUG(524, *YYCURSOR);
#line 1339 "ext/date/lib/parse_date.re"
#line 1340 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timetiny24 | timeshort24 | timelong24 | iso8601long");
@ -9901,7 +9902,7 @@ yy524:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 9905 "<stdout>"
#line 9906 "<stdout>"
yy525:
YYDEBUG(525, *YYCURSOR);
yyaccept = 10;
@ -10214,7 +10215,7 @@ yy556:
YYDEBUG(556, *YYCURSOR);
++YYCURSOR;
YYDEBUG(557, *YYCURSOR);
#line 1319 "ext/date/lib/parse_date.re"
#line 1320 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
@ -10233,7 +10234,7 @@ yy556:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 10237 "<stdout>"
#line 10238 "<stdout>"
yy558:
YYDEBUG(558, *YYCURSOR);
yyaccept = 10;
@ -10339,7 +10340,7 @@ yy567:
if (yych <= '9') goto yy574;
yy568:
YYDEBUG(568, *YYCURSOR);
#line 1515 "ext/date/lib/parse_date.re"
#line 1516 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
@ -10353,7 +10354,7 @@ yy568:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 10357 "<stdout>"
#line 10358 "<stdout>"
yy569:
YYDEBUG(569, *YYCURSOR);
yych = *++YYCURSOR;
@ -11089,7 +11090,7 @@ yy638:
YYDEBUG(639, *YYCURSOR);
++YYCURSOR;
YYDEBUG(640, *YYCURSOR);
#line 1530 "ext/date/lib/parse_date.re"
#line 1531 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
@ -11100,7 +11101,7 @@ yy638:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11104 "<stdout>"
#line 11105 "<stdout>"
yy641:
YYDEBUG(641, *YYCURSOR);
yyaccept = 10;
@ -11136,7 +11137,7 @@ yy644:
if (yych <= '9') goto yy638;
yy645:
YYDEBUG(645, *YYCURSOR);
#line 1542 "ext/date/lib/parse_date.re"
#line 1543 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
@ -11149,7 +11150,7 @@ yy645:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 11153 "<stdout>"
#line 11154 "<stdout>"
yy646:
YYDEBUG(646, *YYCURSOR);
yyaccept = 10;
@ -11790,7 +11791,7 @@ yy689:
}
yy690:
YYDEBUG(690, *YYCURSOR);
#line 1501 "ext/date/lib/parse_date.re"
#line 1502 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
@ -11803,7 +11804,7 @@ yy690:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 11807 "<stdout>"
#line 11808 "<stdout>"
yy691:
YYDEBUG(691, *YYCURSOR);
yyaccept = 12;
@ -11909,7 +11910,7 @@ yy699:
}
yy700:
YYDEBUG(700, *YYCURSOR);
#line 1433 "ext/date/lib/parse_date.re"
#line 1434 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
@ -11924,7 +11925,7 @@ yy700:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 11928 "<stdout>"
#line 11929 "<stdout>"
yy701:
YYDEBUG(701, *YYCURSOR);
yyaccept = 13;
@ -12158,7 +12159,7 @@ yy733:
if (yych <= ':') goto yy737;
yy734:
YYDEBUG(734, *YYCURSOR);
#line 1728 "ext/date/lib/parse_date.re"
#line 1729 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
@ -12178,7 +12179,7 @@ yy734:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 12182 "<stdout>"
#line 12183 "<stdout>"
yy735:
YYDEBUG(735, *YYCURSOR);
yyaccept = 14;
@ -12798,7 +12799,7 @@ yy807:
}
yy808:
YYDEBUG(808, *YYCURSOR);
#line 1461 "ext/date/lib/parse_date.re"
#line 1462 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
@ -12811,7 +12812,7 @@ yy808:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 12815 "<stdout>"
#line 12816 "<stdout>"
yy809:
YYDEBUG(809, *YYCURSOR);
yych = *++YYCURSOR;
@ -12850,7 +12851,7 @@ yy815:
YYDEBUG(815, *YYCURSOR);
++YYCURSOR;
YYDEBUG(816, *YYCURSOR);
#line 1714 "ext/date/lib/parse_date.re"
#line 1715 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
@ -12863,7 +12864,7 @@ yy815:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 12867 "<stdout>"
#line 12868 "<stdout>"
yy817:
YYDEBUG(817, *YYCURSOR);
yych = *++YYCURSOR;
@ -13028,7 +13029,7 @@ yy827:
}
yy828:
YYDEBUG(828, *YYCURSOR);
#line 1749 "ext/date/lib/parse_date.re"
#line 1750 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
@ -13036,7 +13037,7 @@ yy828:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 13040 "<stdout>"
#line 13041 "<stdout>"
yy829:
YYDEBUG(829, *YYCURSOR);
yych = *++YYCURSOR;
@ -13241,7 +13242,7 @@ yy837:
}
yy838:
YYDEBUG(838, *YYCURSOR);
#line 1570 "ext/date/lib/parse_date.re"
#line 1571 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
@ -13254,7 +13255,7 @@ yy838:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 13258 "<stdout>"
#line 13259 "<stdout>"
yy839:
YYDEBUG(839, *YYCURSOR);
yych = *++YYCURSOR;
@ -13475,7 +13476,7 @@ yy858:
if (yych <= '7') goto yy861;
yy859:
YYDEBUG(859, *YYCURSOR);
#line 1681 "ext/date/lib/parse_date.re"
#line 1682 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
@ -13493,7 +13494,7 @@ yy859:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13497 "<stdout>"
#line 13498 "<stdout>"
yy860:
YYDEBUG(860, *YYCURSOR);
yych = *++YYCURSOR;
@ -13503,7 +13504,7 @@ yy861:
YYDEBUG(861, *YYCURSOR);
++YYCURSOR;
YYDEBUG(862, *YYCURSOR);
#line 1662 "ext/date/lib/parse_date.re"
#line 1663 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
@ -13521,7 +13522,7 @@ yy861:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 13525 "<stdout>"
#line 13526 "<stdout>"
yy863:
YYDEBUG(863, *YYCURSOR);
yych = *++YYCURSOR;
@ -13593,7 +13594,7 @@ yy865:
}
yy866:
YYDEBUG(866, *YYCURSOR);
#line 1648 "ext/date/lib/parse_date.re"
#line 1649 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
@ -13606,7 +13607,7 @@ yy866:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 13610 "<stdout>"
#line 13611 "<stdout>"
yy867:
YYDEBUG(867, *YYCURSOR);
yych = *++YYCURSOR;
@ -13709,7 +13710,7 @@ yy886:
++YYCURSOR;
yy887:
YYDEBUG(887, *YYCURSOR);
#line 1622 "ext/date/lib/parse_date.re"
#line 1623 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
@ -13734,7 +13735,7 @@ yy887:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 13738 "<stdout>"
#line 13739 "<stdout>"
yy888:
YYDEBUG(888, *YYCURSOR);
yych = *++YYCURSOR;
@ -14030,7 +14031,7 @@ yy892:
}
yy893:
YYDEBUG(893, *YYCURSOR);
#line 1610 "ext/date/lib/parse_date.re"
#line 1611 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
@ -14041,7 +14042,7 @@ yy893:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 14045 "<stdout>"
#line 14046 "<stdout>"
yy894:
YYDEBUG(894, *YYCURSOR);
yych = *++YYCURSOR;
@ -14963,7 +14964,7 @@ yy1017:
}
yy1018:
YYDEBUG(1018, *YYCURSOR);
#line 1487 "ext/date/lib/parse_date.re"
#line 1488 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
@ -14976,7 +14977,7 @@ yy1018:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 14980 "<stdout>"
#line 14981 "<stdout>"
yy1019:
YYDEBUG(1019, *YYCURSOR);
yyaccept = 22;
@ -16184,7 +16185,7 @@ yy1125:
}
yy1127:
YYDEBUG(1127, *YYCURSOR);
#line 1367 "ext/date/lib/parse_date.re"
#line 1368 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@ -16206,7 +16207,7 @@ yy1127:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 16210 "<stdout>"
#line 16211 "<stdout>"
yy1128:
YYDEBUG(1128, *YYCURSOR);
yych = *++YYCURSOR;
@ -16306,7 +16307,7 @@ yy1134:
}
yy1135:
YYDEBUG(1135, *YYCURSOR);
#line 1413 "ext/date/lib/parse_date.re"
#line 1414 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
@ -16325,7 +16326,7 @@ yy1135:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 16329 "<stdout>"
#line 16330 "<stdout>"
yy1136:
YYDEBUG(1136, *YYCURSOR);
yyaccept = 25;
@ -17301,7 +17302,7 @@ yy1178:
}
yy1179:
YYDEBUG(1179, *YYCURSOR);
#line 1821 "ext/date/lib/parse_date.re"
#line 1822 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@ -17317,7 +17318,7 @@ yy1179:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 17321 "<stdout>"
#line 17322 "<stdout>"
yy1180:
YYDEBUG(1180, *YYCURSOR);
++YYCURSOR;
@ -17383,7 +17384,7 @@ yy1188:
YYDEBUG(1188, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1189, *YYCURSOR);
#line 1280 "ext/date/lib/parse_date.re"
#line 1281 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@ -17404,7 +17405,7 @@ yy1188:
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
#line 17408 "<stdout>"
#line 17409 "<stdout>"
yy1190:
YYDEBUG(1190, *YYCURSOR);
yyaccept = 26;
@ -17544,7 +17545,7 @@ yy1205:
}
yy1206:
YYDEBUG(1206, *YYCURSOR);
#line 1797 "ext/date/lib/parse_date.re"
#line 1798 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
@ -17567,7 +17568,7 @@ yy1206:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 17571 "<stdout>"
#line 17572 "<stdout>"
yy1207:
YYDEBUG(1207, *YYCURSOR);
yych = *++YYCURSOR;
@ -20516,7 +20517,7 @@ yy1387:
}
yy1388:
YYDEBUG(1388, *YYCURSOR);
#line 1257 "ext/date/lib/parse_date.re"
#line 1258 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
@ -20538,7 +20539,7 @@ yy1388:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 20542 "<stdout>"
#line 20543 "<stdout>"
yy1389:
YYDEBUG(1389, *YYCURSOR);
yyaccept = 28;
@ -20837,7 +20838,7 @@ yy1410:
YYDEBUG(1410, *YYCURSOR);
++YYCURSOR;
YYDEBUG(1411, *YYCURSOR);
#line 1240 "ext/date/lib/parse_date.re"
#line 1241 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
@ -20853,7 +20854,7 @@ yy1410:
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
#line 20857 "<stdout>"
#line 20858 "<stdout>"
yy1412:
YYDEBUG(1412, *YYCURSOR);
yyaccept = 1;
@ -22375,7 +22376,7 @@ yy1483:
if (yych <= '9') goto yy1483;
yy1485:
YYDEBUG(1485, *YYCURSOR);
#line 1174 "ext/date/lib/parse_date.re"
#line 1175 "ext/date/lib/parse_date.re"
{
timelib_ull i;
@ -22400,7 +22401,7 @@ yy1485:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22404 "<stdout>"
#line 22405 "<stdout>"
yy1486:
YYDEBUG(1486, *YYCURSOR);
++YYCURSOR;
@ -22408,7 +22409,7 @@ yy1486:
if (yych <= '9') goto yy1488;
yy1487:
YYDEBUG(1487, *YYCURSOR);
#line 1200 "ext/date/lib/parse_date.re"
#line 1201 "ext/date/lib/parse_date.re"
{
timelib_sll i;
timelib_ull us;
@ -22447,7 +22448,7 @@ yy1487:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22451 "<stdout>"
#line 22452 "<stdout>"
yy1488:
YYDEBUG(1488, *YYCURSOR);
yych = *++YYCURSOR;
@ -22916,7 +22917,7 @@ yy1523:
++YYCURSOR;
yy1524:
YYDEBUG(1524, *YYCURSOR);
#line 1162 "ext/date/lib/parse_date.re"
#line 1163 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@ -22927,7 +22928,7 @@ yy1524:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22931 "<stdout>"
#line 22932 "<stdout>"
yy1525:
YYDEBUG(1525, *YYCURSOR);
yych = *++YYCURSOR;
@ -22962,7 +22963,7 @@ yy1526:
}
yy1527:
YYDEBUG(1527, *YYCURSOR);
#line 1152 "ext/date/lib/parse_date.re"
#line 1153 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
@ -22971,7 +22972,7 @@ yy1527:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 22975 "<stdout>"
#line 22976 "<stdout>"
yy1528:
YYDEBUG(1528, *YYCURSOR);
yych = *++YYCURSOR;
@ -25066,7 +25067,7 @@ yy1611:
}
yy1612:
YYDEBUG(1612, *YYCURSOR);
#line 1131 "ext/date/lib/parse_date.re"
#line 1132 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@ -25074,7 +25075,7 @@ yy1612:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 25078 "<stdout>"
#line 25079 "<stdout>"
yy1613:
YYDEBUG(1613, *YYCURSOR);
yych = *++YYCURSOR;
@ -25213,7 +25214,7 @@ yy1619:
}
yy1620:
YYDEBUG(1620, *YYCURSOR);
#line 1140 "ext/date/lib/parse_date.re"
#line 1141 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
@ -25224,7 +25225,7 @@ yy1620:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 25228 "<stdout>"
#line 25229 "<stdout>"
yy1621:
YYDEBUG(1621, *YYCURSOR);
yyaccept = 1;
@ -25757,7 +25758,7 @@ yy1642:
++YYCURSOR;
yy1643:
YYDEBUG(1643, *YYCURSOR);
#line 1119 "ext/date/lib/parse_date.re"
#line 1120 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@ -25768,7 +25769,7 @@ yy1643:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 25772 "<stdout>"
#line 25773 "<stdout>"
yy1644:
YYDEBUG(1644, *YYCURSOR);
yyaccept = 1;
@ -25941,7 +25942,7 @@ yy1649:
goto yy1643;
}
}
#line 1947 "ext/date/lib/parse_date.re"
#line 1948 "ext/date/lib/parse_date.re"
}

View file

@ -780,10 +780,11 @@ static timelib_long timelib_lookup_abbr(const char **ptr, int *dst, char **tz_ab
timelib_long value = 0;
const timelib_tz_lookup_table *tp;
/* Only include A-Z, a-z, /, _, and - in abbreviations/TZ IDs */
/* Only include A-Z, a-z, 0-9, /, _, and - in abbreviations/TZ IDs */
while (
(**ptr >= 'A' && **ptr <= 'Z') ||
(**ptr >= 'a' && **ptr <= 'z') ||
(**ptr >= '0' && **ptr <= '9') ||
**ptr == '/' || **ptr == '_' || **ptr == '-'
) {
++*ptr;

View file

@ -19,7 +19,7 @@ DateInterval Object
[i] => 0
[s] => 0
[f] => 0
[invert] => 1
[invert] => 0
[days] => 0
[from_string] =>
)
@ -32,6 +32,7 @@ DateInterval Object
[i] => 0
[s] => 0
[f] => 0
[invert] => 0
[days] => 0
[from_string] =>
)