-/* Generated by re2c 0.9.8 on Tue Jul 26 18:01:10 2005 */
+/* Generated by re2c 0.9.8.dev on Tue Aug 9 23:05:03 2005 */
#line 1 "resource/parse_date.re"
/*
+----------------------------------------------------------------------+
t->is_localtime = 1;
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
*tz_not_found = 0;
+ t->dst = 0;
return -1 * timelib_parse_tz_cor(ptr);
} else if (**ptr == '-') {
t->is_localtime = 1;
t->zone_type = TIMELIB_ZONETYPE_OFFSET;
*tz_not_found = 0;
+ t->dst = 0;
return timelib_parse_tz_cor(ptr);
} else {
std:
s->tok = cursor;
s->len = 0;
-#line 876 "resource/parse_date.re"
+#line 878 "resource/parse_date.re"
{
0, 0, 0, 0, 0, 0, 0, 0,
};
-#line 814 "<stdout>"
+#line 816 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1340 "resource/parse_date.re"
+#line 1342 "resource/parse_date.re"
{
int tz_not_found;
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
-#line 901 "<stdout>"
+#line 903 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
yy7:
YYDEBUG(7, *YYCURSOR);
-#line 1404 "resource/parse_date.re"
+#line 1406 "resource/parse_date.re"
{
/* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
s->errors++;
goto std;
}
-#line 984 "<stdout>"
+#line 986 "<stdout>"
yy8:
YYDEBUG(8, *YYCURSOR);
yyaccept = 0;
yy44:
YYDEBUG(44, *YYCURSOR);
-#line 1393 "resource/parse_date.re"
+#line 1395 "resource/parse_date.re"
{
goto std;
}
-#line 1832 "<stdout>"
+#line 1834 "<stdout>"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
yy46:
YYDEBUG(46, *YYCURSOR);
-#line 1398 "resource/parse_date.re"
+#line 1400 "resource/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
-#line 1841 "<stdout>"
+#line 1843 "<stdout>"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
yy85:
YYDEBUG(85, *YYCURSOR);
-#line 1377 "resource/parse_date.re"
+#line 1379 "resource/parse_date.re"
{
timelib_ull i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2231 "<stdout>"
+#line 2233 "<stdout>"
yy86:
YYDEBUG(86, *YYCURSOR);
++YYCURSOR;
yy151:
YYDEBUG(151, *YYCURSOR);
-#line 1335 "resource/parse_date.re"
+#line 1337 "resource/parse_date.re"
{
goto std;
}
-#line 2794 "<stdout>"
+#line 2796 "<stdout>"
yy152:
YYDEBUG(152, *YYCURSOR);
yyaccept = 1;
yy158:
YYDEBUG(158, *YYCURSOR);
-#line 1319 "resource/parse_date.re"
+#line 1321 "resource/parse_date.re"
{
const timelib_relunit* relunit;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 2834 "<stdout>"
+#line 2836 "<stdout>"
yy159:
YYDEBUG(159, *YYCURSOR);
yyaccept = 1;
yy190:
YYDEBUG(190, *YYCURSOR);
-#line 1303 "resource/parse_date.re"
+#line 1305 "resource/parse_date.re"
{
timelib_sll i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 3152 "<stdout>"
+#line 3154 "<stdout>"
yy191:
YYDEBUG(191, *YYCURSOR);
++YYCURSOR;
yy509:
YYDEBUG(509, *YYCURSOR);
-#line 1135 "resource/parse_date.re"
+#line 1137 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 8144 "<stdout>"
+#line 8146 "<stdout>"
yy510:
YYDEBUG(510, *YYCURSOR);
yych = *++YYCURSOR;
yy527:
YYDEBUG(527, *YYCURSOR);
-#line 1350 "resource/parse_date.re"
+#line 1352 "resource/parse_date.re"
{
int tz_not_found;
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
-#line 8266 "<stdout>"
+#line 8268 "<stdout>"
yy528:
YYDEBUG(528, *YYCURSOR);
yyaccept = 7;
yy562:
YYDEBUG(562, *YYCURSOR);
-#line 1111 "resource/parse_date.re"
+#line 1113 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 8515 "<stdout>"
+#line 8517 "<stdout>"
yy563:
YYDEBUG(563, *YYCURSOR);
yyaccept = 6;
yy577:
YYDEBUG(577, *YYCURSOR);
-#line 1239 "resource/parse_date.re"
+#line 1241 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 8626 "<stdout>"
+#line 8628 "<stdout>"
yy578:
YYDEBUG(578, *YYCURSOR);
yych = *++YYCURSOR;
yy673:
YYDEBUG(673, *YYCURSOR);
-#line 1289 "resource/parse_date.re"
+#line 1291 "resource/parse_date.re"
{
TIMELIB_INIT;
s->time->relative.y = 0 - s->time->relative.y;
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
-#line 9944 "<stdout>"
+#line 9946 "<stdout>"
yy674:
YYDEBUG(674, *YYCURSOR);
yyaccept = 1;
yy777:
YYDEBUG(777, *YYCURSOR);
-#line 1147 "resource/parse_date.re"
+#line 1149 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
-#line 11671 "<stdout>"
+#line 11673 "<stdout>"
yy778:
YYDEBUG(778, *YYCURSOR);
yyaccept = 10;
yy786:
YYDEBUG(786, *YYCURSOR);
-#line 963 "resource/parse_date.re"
+#line 965 "resource/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
-#line 11765 "<stdout>"
+#line 11767 "<stdout>"
yy787:
YYDEBUG(787, *YYCURSOR);
yyaccept = 11;
yy801:
YYDEBUG(801, *YYCURSOR);
-#line 948 "resource/parse_date.re"
+#line 950 "resource/parse_date.re"
{
DEBUG_OUTPUT("timeshort12 | timelong12");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
-#line 11876 "<stdout>"
+#line 11878 "<stdout>"
yy802:
YYDEBUG(802, *YYCURSOR);
yych = *++YYCURSOR;
yy814:
YYDEBUG(814, *YYCURSOR);
-#line 1087 "resource/parse_date.re"
+#line 1089 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
-#line 11983 "<stdout>"
+#line 11985 "<stdout>"
yy815:
YYDEBUG(815, *YYCURSOR);
yych = *++YYCURSOR;
yy856:
YYDEBUG(856, *YYCURSOR);
-#line 1099 "resource/parse_date.re"
+#line 1101 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
-#line 12272 "<stdout>"
+#line 12274 "<stdout>"
yy857:
YYDEBUG(857, *YYCURSOR);
yych = *++YYCURSOR;
yy923:
YYDEBUG(923, *YYCURSOR);
-#line 1075 "resource/parse_date.re"
+#line 1077 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 12876 "<stdout>"
+#line 12878 "<stdout>"
yy924:
YYDEBUG(924, *YYCURSOR);
yych = *++YYCURSOR;
yy927:
YYDEBUG(927, *YYCURSOR);
-#line 1050 "resource/parse_date.re"
+#line 1052 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
-#line 12903 "<stdout>"
+#line 12905 "<stdout>"
yy928:
YYDEBUG(928, *YYCURSOR);
yyaccept = 12;
yy960:
YYDEBUG(960, *YYCURSOR);
-#line 1263 "resource/parse_date.re"
+#line 1265 "resource/parse_date.re"
{
int tz_not_found;
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 13076 "<stdout>"
+#line 13078 "<stdout>"
yy961:
YYDEBUG(961, *YYCURSOR);
yyaccept = 13;
yy1000:
YYDEBUG(1000, *YYCURSOR);
-#line 1251 "resource/parse_date.re"
+#line 1253 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
-#line 13315 "<stdout>"
+#line 13317 "<stdout>"
yy1001:
YYDEBUG(1001, *YYCURSOR);
yych = *++YYCURSOR;
yy1012:
YYDEBUG(1012, *YYCURSOR);
-#line 1281 "resource/parse_date.re"
+#line 1283 "resource/parse_date.re"
{
TIMELIB_INIT;
s->time->y = timelib_get_nr((char **) &ptr, 4);
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
-#line 13430 "<stdout>"
+#line 13432 "<stdout>"
yy1013:
YYDEBUG(1013, *YYCURSOR);
yych = *++YYCURSOR;
yy1021:
YYDEBUG(1021, *YYCURSOR);
-#line 1123 "resource/parse_date.re"
+#line 1125 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
-#line 13555 "<stdout>"
+#line 13557 "<stdout>"
yy1022:
YYDEBUG(1022, *YYCURSOR);
yych = *++YYCURSOR;
yy1041:
YYDEBUG(1041, *YYCURSOR);
-#line 1220 "resource/parse_date.re"
+#line 1222 "resource/parse_date.re"
{
timelib_sll w, d;
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13742 "<stdout>"
+#line 13744 "<stdout>"
yy1042:
YYDEBUG(1042, *YYCURSOR);
++YYCURSOR;
yy1043:
YYDEBUG(1043, *YYCURSOR);
-#line 1201 "resource/parse_date.re"
+#line 1203 "resource/parse_date.re"
{
timelib_sll w, d;
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
-#line 13764 "<stdout>"
+#line 13766 "<stdout>"
yy1044:
YYDEBUG(1044, *YYCURSOR);
yych = *++YYCURSOR;
yy1047:
YYDEBUG(1047, *YYCURSOR);
-#line 1189 "resource/parse_date.re"
+#line 1191 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
-#line 13836 "<stdout>"
+#line 13838 "<stdout>"
yy1048:
YYDEBUG(1048, *YYCURSOR);
yych = *++YYCURSOR;
yy1054:
YYDEBUG(1054, *YYCURSOR);
-#line 1157 "resource/parse_date.re"
+#line 1159 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
-#line 13943 "<stdout>"
+#line 13945 "<stdout>"
yy1055:
YYDEBUG(1055, *YYCURSOR);
yych = *++YYCURSOR;
yy1065:
YYDEBUG(1065, *YYCURSOR);
-#line 1168 "resource/parse_date.re"
+#line 1170 "resource/parse_date.re"
{
int tz_not_found;
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 14039 "<stdout>"
+#line 14041 "<stdout>"
yy1066:
YYDEBUG(1066, *YYCURSOR);
yych = *++YYCURSOR;
yy1159:
YYDEBUG(1159, *YYCURSOR);
-#line 1064 "resource/parse_date.re"
+#line 1066 "resource/parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 14478 "<stdout>"
+#line 14480 "<stdout>"
yy1160:
YYDEBUG(1160, *YYCURSOR);
yych = *++YYCURSOR;
yy1236:
YYDEBUG(1236, *YYCURSOR);
-#line 987 "resource/parse_date.re"
+#line 989 "resource/parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 15018 "<stdout>"
+#line 15020 "<stdout>"
yy1237:
YYDEBUG(1237, *YYCURSOR);
yych = *++YYCURSOR;
yy1244:
YYDEBUG(1244, *YYCURSOR);
-#line 1032 "resource/parse_date.re"
+#line 1034 "resource/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 15116 "<stdout>"
+#line 15118 "<stdout>"
yy1245:
YYDEBUG(1245, *YYCURSOR);
yyaccept = 21;
yy1261:
YYDEBUG(1261, *YYCURSOR);
-#line 924 "resource/parse_date.re"
+#line 926 "resource/parse_date.re"
{
timelib_ull i;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15311 "<stdout>"
+#line 15313 "<stdout>"
yy1262:
YYDEBUG(1262, *YYCURSOR);
yych = *++YYCURSOR;
yy1270:
YYDEBUG(1270, *YYCURSOR);
-#line 912 "resource/parse_date.re"
+#line 914 "resource/parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15375 "<stdout>"
+#line 15377 "<stdout>"
yy1271:
YYDEBUG(1271, *YYCURSOR);
yych = *++YYCURSOR;
yy1273:
YYDEBUG(1273, *YYCURSOR);
-#line 902 "resource/parse_date.re"
+#line 904 "resource/parse_date.re"
{
DEBUG_OUTPUT("today");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15391 "<stdout>"
+#line 15393 "<stdout>"
yy1274:
YYDEBUG(1274, *YYCURSOR);
yych = *++YYCURSOR;
yy1276:
YYDEBUG(1276, *YYCURSOR);
-#line 893 "resource/parse_date.re"
+#line 895 "resource/parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15427 "<stdout>"
+#line 15429 "<stdout>"
yy1277:
YYDEBUG(1277, *YYCURSOR);
yych = *++YYCURSOR;
yy1285:
YYDEBUG(1285, *YYCURSOR);
-#line 881 "resource/parse_date.re"
+#line 883 "resource/parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 15478 "<stdout>"
+#line 15480 "<stdout>"
}
}
-#line 1409 "resource/parse_date.re"
+#line 1411 "resource/parse_date.re"
}