-/* Generated by re2c 0.15.3 on Sun Jul 24 14:49:45 2016 */
+/* Generated by re2c 0.15.3 on Fri Sep 30 20:18:29 2016 */
#line 1 "ext/date/lib/parse_date.re"
/*
* The MIT License (MIT)
}
++*ptr;
if (**ptr == '.') {
- *ptr += 3;
- } else {
+ ++*ptr;
+ }
+ if (**ptr == 'M' || **ptr == 'm') {
+ ++*ptr;
+ }
+ if (**ptr == '.') {
++*ptr;
}
return retval;
std:
s->tok = cursor;
s->len = 0;
-#line 946 "ext/date/lib/parse_date.re"
+#line 950 "ext/date/lib/parse_date.re"
-#line 828 "<stdout>"
+#line 832 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept = 0;
}
}
yy3:
-#line 1626 "ext/date/lib/parse_date.re"
+#line 1630 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 976 "<stdout>"
+#line 980 "<stdout>"
yy4:
yych = *++YYCURSOR;
if (yych <= 'E') {
if (yych <= '/') goto yy12;
if (yych <= '9') goto yy1385;
yy12:
-#line 1721 "ext/date/lib/parse_date.re"
+#line 1725 "ext/date/lib/parse_date.re"
{
add_error(s, "Unexpected character");
goto std;
}
-#line 1281 "<stdout>"
+#line 1285 "<stdout>"
yy13:
yych = *++YYCURSOR;
if (yych <= 'R') {
if (yych <= '/') goto yy49;
if (yych <= '9') goto yy54;
yy49:
-#line 1710 "ext/date/lib/parse_date.re"
+#line 1714 "ext/date/lib/parse_date.re"
{
goto std;
}
-#line 2299 "<stdout>"
+#line 2303 "<stdout>"
yy50:
yych = *++YYCURSOR;
goto yy49;
yy51:
++YYCURSOR;
-#line 1715 "ext/date/lib/parse_date.re"
+#line 1719 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 2310 "<stdout>"
+#line 2314 "<stdout>"
yy53:
yych = *++YYCURSOR;
goto yy12;
if (yych == 'S') goto yy73;
if (yych == 's') goto yy73;
yy72:
-#line 1694 "ext/date/lib/parse_date.re"
+#line 1698 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2692 "<stdout>"
+#line 2696 "<stdout>"
yy73:
yych = *++YYCURSOR;
if (yych == 'D') goto yy74;
}
}
yy166:
-#line 1557 "ext/date/lib/parse_date.re"
+#line 1561 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
TIMELIB_DEINIT;
return TIMELIB_WEEKDAY;
}
-#line 3377 "<stdout>"
+#line 3381 "<stdout>"
yy167:
yych = *++YYCURSOR;
if (yych <= 'K') {
}
}
yy193:
-#line 1616 "ext/date/lib/parse_date.re"
+#line 1620 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("monthtext");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 3879 "<stdout>"
+#line 3883 "<stdout>"
yy194:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 21) YYFILL(21);
}
}
yy198:
-#line 1362 "ext/date/lib/parse_date.re"
+#line 1366 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datetextual | datenoyear");
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 3938 "<stdout>"
+#line 3942 "<stdout>"
yy199:
yyaccept = 6;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') goto yy224;
}
yy222:
-#line 1664 "ext/date/lib/parse_date.re"
+#line 1668 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4212 "<stdout>"
+#line 4216 "<stdout>"
yy223:
yyaccept = 7;
yych = *(YYMARKER = ++YYCURSOR);
}
yy277:
++YYCURSOR;
-#line 1640 "ext/date/lib/parse_date.re"
+#line 1644 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 4877 "<stdout>"
+#line 4881 "<stdout>"
yy279:
yych = *++YYCURSOR;
if (yych <= 0x1F) {
yy293:
++YYCURSOR;
yy294:
-#line 1334 "ext/date/lib/parse_date.re"
+#line 1338 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenoday");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 5052 "<stdout>"
+#line 5056 "<stdout>"
yy295:
yych = *++YYCURSOR;
if (yych <= '/') {
if ((yych = *YYCURSOR) <= '/') goto yy363;
if (yych <= '9') goto yy364;
yy363:
-#line 1478 "ext/date/lib/parse_date.re"
+#line 1482 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextshort");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 6216 "<stdout>"
+#line 6220 "<stdout>"
yy364:
yych = *++YYCURSOR;
if (yych <= '/') goto yy363;
if (yych <= 'z') goto yy142;
}
yy392:
-#line 1536 "ext/date/lib/parse_date.re"
+#line 1540 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 6845 "<stdout>"
+#line 6849 "<stdout>"
yy393:
yyaccept = 5;
yych = *(YYMARKER = ++YYCURSOR);
yy453:
++YYCURSOR;
yy454:
-#line 1239 "ext/date/lib/parse_date.re"
+#line 1243 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 8544 "<stdout>"
+#line 8548 "<stdout>"
yy455:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
}
}
yy475:
-#line 1376 "ext/date/lib/parse_date.re"
+#line 1380 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenoyearrev");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 9091 "<stdout>"
+#line 9095 "<stdout>"
yy476:
yyaccept = 10;
yych = *(YYMARKER = ++YYCURSOR);
}
yy487:
++YYCURSOR;
-#line 1094 "ext/date/lib/parse_date.re"
+#line 1098 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 9235 "<stdout>"
+#line 9239 "<stdout>"
yy489:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= ':') goto yy492;
}
yy490:
-#line 1131 "ext/date/lib/parse_date.re"
+#line 1135 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9271 "<stdout>"
+#line 9275 "<stdout>"
yy491:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
}
yy522:
++YYCURSOR;
-#line 1111 "ext/date/lib/parse_date.re"
+#line 1115 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("mssqltime");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 9567 "<stdout>"
+#line 9571 "<stdout>"
yy524:
yyaccept = 11;
YYMARKER = ++YYCURSOR;
if ((yych = *YYCURSOR) <= '/') goto yy534;
if (yych <= '9') goto yy540;
yy534:
-#line 1293 "ext/date/lib/parse_date.re"
+#line 1297 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datefull");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 9676 "<stdout>"
+#line 9680 "<stdout>"
yy535:
yych = *++YYCURSOR;
if (yych == 'M') goto yy536;
if (yych <= '/') goto yy56;
if (yych >= ':') goto yy56;
++YYCURSOR;
-#line 1308 "ext/date/lib/parse_date.re"
+#line 1312 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pointed date YYYY");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10351 "<stdout>"
+#line 10355 "<stdout>"
yy607:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy611;
if (yych <= '9') goto yy604;
yy611:
-#line 1320 "ext/date/lib/parse_date.re"
+#line 1324 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pointed date YY");
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 10395 "<stdout>"
+#line 10399 "<stdout>"
yy612:
yyaccept = 11;
yych = *(YYMARKER = ++YYCURSOR);
}
}
yy656:
-#line 1279 "ext/date/lib/parse_date.re"
+#line 1283 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshort");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11004 "<stdout>"
+#line 11008 "<stdout>"
yy657:
yyaccept = 13;
yych = *(YYMARKER = ++YYCURSOR);
}
}
yy666:
-#line 1223 "ext/date/lib/parse_date.re"
+#line 1227 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("americanshort | american");
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 11115 "<stdout>"
+#line 11119 "<stdout>"
yy667:
yyaccept = 14;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '9') goto yy702;
if (yych <= ':') goto yy703;
yy700:
-#line 1506 "ext/date/lib/parse_date.re"
+#line 1510 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 11334 "<stdout>"
+#line 11338 "<stdout>"
yy701:
yych = *++YYCURSOR;
if (yych <= '5') {
if (yych <= 't') goto yy662;
}
yy763:
-#line 1251 "ext/date/lib/parse_date.re"
+#line 1255 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("iso8601date2");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 11834 "<stdout>"
+#line 11838 "<stdout>"
yy764:
yych = *++YYCURSOR;
if (yych == 'C') goto yy765;
if (yych >= '2') goto yy56;
yy770:
++YYCURSOR;
-#line 1492 "ext/date/lib/parse_date.re"
+#line 1496 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgtextreverse");
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 11878 "<stdout>"
+#line 11882 "<stdout>"
yy772:
yych = *++YYCURSOR;
if (yych == 'V') goto yy765;
default: goto yy783;
}
yy783:
-#line 1527 "ext/date/lib/parse_date.re"
+#line 1531 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 12011 "<stdout>"
+#line 12015 "<stdout>"
yy784:
yych = *++YYCURSOR;
switch (yych) {
if (yych <= 'X') goto yy883;
}
yy793:
-#line 1348 "ext/date/lib/parse_date.re"
+#line 1352 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("datenodayrev");
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 12162 "<stdout>"
+#line 12166 "<stdout>"
yy794:
yych = *++YYCURSOR;
if (yych == 'I') goto yy927;
if (yych <= '/') goto yy814;
if (yych <= '7') goto yy816;
yy814:
-#line 1459 "ext/date/lib/parse_date.re"
+#line 1463 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 12374 "<stdout>"
+#line 12378 "<stdout>"
yy815:
yych = *++YYCURSOR;
if (yych <= '/') goto yy56;
if (yych >= '8') goto yy56;
yy816:
++YYCURSOR;
-#line 1440 "ext/date/lib/parse_date.re"
+#line 1444 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 12399 "<stdout>"
+#line 12403 "<stdout>"
yy818:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
}
}
yy821:
-#line 1426 "ext/date/lib/parse_date.re"
+#line 1430 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("pgydotd");
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 12472 "<stdout>"
+#line 12476 "<stdout>"
yy822:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
yy841:
++YYCURSOR;
yy842:
-#line 1400 "ext/date/lib/parse_date.re"
+#line 1404 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 12579 "<stdout>"
+#line 12583 "<stdout>"
yy843:
yych = *++YYCURSOR;
if (yych <= '2') {
}
}
yy848:
-#line 1388 "ext/date/lib/parse_date.re"
+#line 1392 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("datenocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 12846 "<stdout>"
+#line 12850 "<stdout>"
yy849:
yych = *++YYCURSOR;
if (yych <= 'H') {
if (yych <= '/') goto yy973;
if (yych <= '9') goto yy995;
yy973:
-#line 1265 "ext/date/lib/parse_date.re"
+#line 1269 "ext/date/lib/parse_date.re"
{
int length = 0;
DEBUG_OUTPUT("gnudateshorter");
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 13653 "<stdout>"
+#line 13657 "<stdout>"
yy974:
yyaccept = 22;
yych = *(YYMARKER = ++YYCURSOR);
default: goto yy1067;
}
yy1067:
-#line 1157 "ext/date/lib/parse_date.re"
+#line 1161 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 14587 "<stdout>"
+#line 14591 "<stdout>"
yy1068:
yych = *++YYCURSOR;
if (yych <= '/') goto yy60;
}
}
yy1075:
-#line 1203 "ext/date/lib/parse_date.re"
+#line 1207 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 14690 "<stdout>"
+#line 14694 "<stdout>"
yy1076:
yyaccept = 25;
yych = *(YYMARKER = ++YYCURSOR);
}
}
yy1117:
-#line 1599 "ext/date/lib/parse_date.re"
+#line 1603 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15562 "<stdout>"
+#line 15566 "<stdout>"
yy1118:
++YYCURSOR;
if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
if (yych != 'f') goto yy56;
yy1125:
++YYCURSOR;
-#line 1072 "ext/date/lib/parse_date.re"
+#line 1076 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_WEEK_DAY_OF_MONTH;
}
-#line 15625 "<stdout>"
+#line 15629 "<stdout>"
yy1127:
yyaccept = 26;
yych = *(YYMARKER = ++YYCURSOR);
}
}
yy1141:
-#line 1575 "ext/date/lib/parse_date.re"
+#line 1579 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior = 0;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15741 "<stdout>"
+#line 15745 "<stdout>"
yy1142:
yych = *++YYCURSOR;
goto yy1117;
if (yych <= '9') goto yy1296;
goto yy1297;
yy1294:
-#line 1049 "ext/date/lib/parse_date.re"
+#line 1053 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("backof | frontof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 18287 "<stdout>"
+#line 18291 "<stdout>"
yy1295:
yyaccept = 28;
yych = *(YYMARKER = ++YYCURSOR);
if (yych != 'f') goto yy56;
yy1315:
++YYCURSOR;
-#line 1032 "ext/date/lib/parse_date.re"
+#line 1036 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("firstdayof | lastdayof");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_LF_DAY_OF_MONTH;
}
-#line 18542 "<stdout>"
+#line 18546 "<stdout>"
yy1317:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
if (yych <= '/') goto yy1387;
if (yych <= '9') goto yy1385;
yy1387:
-#line 1006 "ext/date/lib/parse_date.re"
+#line 1010 "ext/date/lib/parse_date.re"
{
timelib_ull i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 19927 "<stdout>"
+#line 19931 "<stdout>"
yy1388:
yych = *++YYCURSOR;
if (yych <= 'N') {
yy1416:
++YYCURSOR;
yy1417:
-#line 994 "ext/date/lib/parse_date.re"
+#line 998 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 20344 "<stdout>"
+#line 20348 "<stdout>"
yy1418:
yych = *++YYCURSOR;
if (yych <= 'Y') {
if (yych <= 'z') goto yy144;
}
yy1420:
-#line 984 "ext/date/lib/parse_date.re"
+#line 988 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("midnight | today");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 20385 "<stdout>"
+#line 20389 "<stdout>"
yy1421:
yych = *++YYCURSOR;
if (yych <= 'S') {
if (yych <= 'z') goto yy142;
}
yy1500:
-#line 963 "ext/date/lib/parse_date.re"
+#line 967 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 22325 "<stdout>"
+#line 22329 "<stdout>"
yy1501:
yych = *++YYCURSOR;
if (yych <= 'N') {
if (yych <= 'z') goto yy143;
}
yy1508:
-#line 972 "ext/date/lib/parse_date.re"
+#line 976 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("noon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 22467 "<stdout>"
+#line 22471 "<stdout>"
yy1509:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
yy1530:
++YYCURSOR;
yy1531:
-#line 951 "ext/date/lib/parse_date.re"
+#line 955 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 22988 "<stdout>"
+#line 22992 "<stdout>"
yy1532:
yyaccept = 0;
yych = *(YYMARKER = ++YYCURSOR);
goto yy1531;
}
}
-#line 1725 "ext/date/lib/parse_date.re"
+#line 1729 "ext/date/lib/parse_date.re"
}