- parse_date.c is a generated file, updated parse_date.re and regenerated

parse_date.c.
This commit is contained in:
Derick Rethans 2005-07-01 07:18:43 +00:00
parent 98a2eeacc7
commit e6820914ff
3 changed files with 74 additions and 76 deletions

View File

@ -1,4 +1,4 @@
/* Generated by re2c 0.9.8.dev on Wed Jun 29 20:46:25 2005 */
/* Generated by re2c 0.9.8.dev on Fri Jul 1 09:16:07 2005 */
#line 1 "parse_date.re"
/*
+----------------------------------------------------------------------+
@ -768,7 +768,7 @@ static int scan(Scanner *s)
std:
s->tok = cursor;
s->len = 0;
#line 873 "parse_date.re"
#line 872 "parse_date.re"
{
@ -807,7 +807,7 @@ std:
0, 0, 0, 0, 0, 0, 0, 0,
};
#line 812 "<stdout>"
#line 811 "<stdout>"
{
YYCTYPE yych;
unsigned int yyaccept;
@ -885,14 +885,14 @@ yy2:
yy3:
YYDEBUG(3, *YYCURSOR);
#line 1311 "parse_date.re"
#line 1310 "parse_date.re"
{
TIMELIB_INIT;
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time);
TIMELIB_DEINIT;
return TIMELIB_TIMEZONE;
}
#line 890 "<stdout>"
#line 889 "<stdout>"
yy4:
YYDEBUG(4, *YYCURSOR);
yych = *++YYCURSOR;
@ -963,12 +963,12 @@ yy6:
yy7:
YYDEBUG(7, *YYCURSOR);
#line 1371 "parse_date.re"
#line 1370 "parse_date.re"
{
/* printf("unexpected character: #%d, %c\n", *s->tok, *s->tok); */
goto std;
}
#line 958 "<stdout>"
#line 957 "<stdout>"
yy8:
YYDEBUG(8, *YYCURSOR);
yyaccept = 0;
@ -1703,11 +1703,11 @@ yy43:
yy44:
YYDEBUG(44, *YYCURSOR);
#line 1360 "parse_date.re"
#line 1359 "parse_date.re"
{
goto std;
}
#line 1618 "<stdout>"
#line 1617 "<stdout>"
yy45:
YYDEBUG(45, *YYCURSOR);
++YYCURSOR;
@ -1715,12 +1715,12 @@ yy45:
yy46:
YYDEBUG(46, *YYCURSOR);
#line 1365 "parse_date.re"
#line 1364 "parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
}
#line 1627 "<stdout>"
#line 1626 "<stdout>"
yy47:
YYDEBUG(47, *YYCURSOR);
yych = *++YYCURSOR;
@ -2073,7 +2073,7 @@ yy80:
yy81:
YYDEBUG(81, *YYCURSOR);
#line 1344 "parse_date.re"
#line 1343 "parse_date.re"
{
timelib_ull i;
@ -2088,7 +2088,7 @@ yy81:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 1924 "<stdout>"
#line 1923 "<stdout>"
yy82:
YYDEBUG(82, *YYCURSOR);
++YYCURSOR;
@ -2711,11 +2711,11 @@ yy147:
yy148:
YYDEBUG(148, *YYCURSOR);
#line 1306 "parse_date.re"
#line 1305 "parse_date.re"
{
goto std;
}
#line 2417 "<stdout>"
#line 2416 "<stdout>"
yy149:
YYDEBUG(149, *YYCURSOR);
yych = *++YYCURSOR;
@ -2757,7 +2757,7 @@ yy154:
yy155:
YYDEBUG(155, *YYCURSOR);
#line 1290 "parse_date.re"
#line 1289 "parse_date.re"
{
const timelib_relunit* relunit;
@ -2772,7 +2772,7 @@ yy155:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2460 "<stdout>"
#line 2459 "<stdout>"
yy156:
YYDEBUG(156, *YYCURSOR);
yyaccept = 1;
@ -3156,7 +3156,7 @@ yy187:
yy188:
YYDEBUG(188, *YYCURSOR);
#line 1274 "parse_date.re"
#line 1273 "parse_date.re"
{
timelib_sll i;
@ -3171,7 +3171,7 @@ yy188:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 2791 "<stdout>"
#line 2790 "<stdout>"
yy189:
YYDEBUG(189, *YYCURSOR);
++YYCURSOR;
@ -5344,7 +5344,7 @@ yy390:
yy391:
YYDEBUG(391, *YYCURSOR);
#line 1104 "parse_date.re"
#line 1103 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -5355,7 +5355,7 @@ yy391:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 4565 "<stdout>"
#line 4564 "<stdout>"
yy392:
YYDEBUG(392, *YYCURSOR);
yych = *++YYCURSOR;
@ -5406,7 +5406,7 @@ yy396:
yy397:
YYDEBUG(397, *YYCURSOR);
#line 1128 "parse_date.re"
#line 1127 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -5417,7 +5417,7 @@ yy397:
TIMELIB_DEINIT;
return TIMELIB_DATE_TEXT;
}
#line 4615 "<stdout>"
#line 4614 "<stdout>"
yy398:
YYDEBUG(398, *YYCURSOR);
yych = *++YYCURSOR;
@ -5506,7 +5506,7 @@ yy408:
yy409:
YYDEBUG(409, *YYCURSOR);
#line 1319 "parse_date.re"
#line 1318 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -5530,7 +5530,7 @@ yy409:
TIMELIB_DEINIT;
return TIMELIB_SHORTDATE_WITH_TIME;
}
#line 4704 "<stdout>"
#line 4703 "<stdout>"
yy410:
YYDEBUG(410, *YYCURSOR);
yyaccept = 7;
@ -5856,7 +5856,7 @@ yy449:
yy450:
YYDEBUG(450, *YYCURSOR);
#line 1220 "parse_date.re"
#line 1219 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -5867,7 +5867,7 @@ yy450:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 4959 "<stdout>"
#line 4958 "<stdout>"
yy451:
YYDEBUG(451, *YYCURSOR);
yych = *++YYCURSOR;
@ -7314,7 +7314,7 @@ yy557:
yy558:
YYDEBUG(558, *YYCURSOR);
#line 1260 "parse_date.re"
#line 1259 "parse_date.re"
{
TIMELIB_INIT;
s->time->relative.y = 0 - s->time->relative.y;
@ -7327,7 +7327,7 @@ yy558:
TIMELIB_DEINIT;
return TIMELIB_AGO;
}
#line 6203 "<stdout>"
#line 6202 "<stdout>"
yy559:
YYDEBUG(559, *YYCURSOR);
yyaccept = 1;
@ -8972,7 +8972,7 @@ yy667:
yy668:
YYDEBUG(668, *YYCURSOR);
#line 960 "parse_date.re"
#line 959 "parse_date.re"
{
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
TIMELIB_INIT;
@ -8993,7 +8993,7 @@ yy668:
TIMELIB_DEINIT;
return TIMELIB_TIME24_WITH_ZONE;
}
#line 7645 "<stdout>"
#line 7644 "<stdout>"
yy669:
YYDEBUG(669, *YYCURSOR);
yyaccept = 10;
@ -9120,7 +9120,7 @@ yy682:
yy683:
YYDEBUG(683, *YYCURSOR);
#line 945 "parse_date.re"
#line 944 "parse_date.re"
{
DEBUG_OUTPUT("timeshort12 | timelong12");
TIMELIB_INIT;
@ -9134,7 +9134,7 @@ yy683:
TIMELIB_DEINIT;
return TIMELIB_TIME12;
}
#line 7756 "<stdout>"
#line 7755 "<stdout>"
yy684:
YYDEBUG(684, *YYCURSOR);
yych = *++YYCURSOR;
@ -9244,7 +9244,7 @@ yy695:
yy696:
YYDEBUG(696, *YYCURSOR);
#line 1080 "parse_date.re"
#line 1079 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -9255,7 +9255,7 @@ yy696:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL;
}
#line 7851 "<stdout>"
#line 7850 "<stdout>"
yy697:
YYDEBUG(697, *YYCURSOR);
yych = *++YYCURSOR;
@ -9622,7 +9622,7 @@ yy754:
yy755:
YYDEBUG(755, *YYCURSOR);
#line 1092 "parse_date.re"
#line 1091 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -9633,7 +9633,7 @@ yy755:
TIMELIB_DEINIT;
return TIMELIB_DATE_FULL_POINTED;
}
#line 8111 "<stdout>"
#line 8110 "<stdout>"
yy756:
YYDEBUG(756, *YYCURSOR);
yych = *++YYCURSOR;
@ -10005,7 +10005,7 @@ yy799:
yy800:
YYDEBUG(800, *YYCURSOR);
#line 1068 "parse_date.re"
#line 1067 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -10016,7 +10016,7 @@ yy800:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 8404 "<stdout>"
#line 8403 "<stdout>"
yy801:
YYDEBUG(801, *YYCURSOR);
yych = *++YYCURSOR;
@ -10038,7 +10038,7 @@ yy803:
yy804:
YYDEBUG(804, *YYCURSOR);
#line 1043 "parse_date.re"
#line 1042 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -10051,7 +10051,7 @@ yy804:
TIMELIB_DEINIT;
return TIMELIB_AMERICAN;
}
#line 8431 "<stdout>"
#line 8430 "<stdout>"
yy805:
YYDEBUG(805, *YYCURSOR);
yyaccept = 11;
@ -10273,7 +10273,7 @@ yy836:
yy837:
YYDEBUG(837, *YYCURSOR);
#line 1244 "parse_date.re"
#line 1243 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_TIME();
@ -10288,7 +10288,7 @@ yy837:
TIMELIB_DEINIT;
return TIMELIB_CLF;
}
#line 8602 "<stdout>"
#line 8601 "<stdout>"
yy838:
YYDEBUG(838, *YYCURSOR);
yyaccept = 12;
@ -10600,7 +10600,7 @@ yy876:
yy877:
YYDEBUG(877, *YYCURSOR);
#line 1232 "parse_date.re"
#line 1231 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -10611,7 +10611,7 @@ yy877:
TIMELIB_DEINIT;
return TIMELIB_PG_TEXT;
}
#line 8844 "<stdout>"
#line 8843 "<stdout>"
yy878:
YYDEBUG(878, *YYCURSOR);
yych = *++YYCURSOR;
@ -10857,7 +10857,7 @@ yy896:
yy897:
YYDEBUG(897, *YYCURSOR);
#line 1116 "parse_date.re"
#line 1115 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -10868,7 +10868,7 @@ yy897:
TIMELIB_DEINIT;
return TIMELIB_DATE_NO_DAY;
}
#line 9057 "<stdout>"
#line 9056 "<stdout>"
yy898:
YYDEBUG(898, *YYCURSOR);
yych = *++YYCURSOR;
@ -11022,7 +11022,7 @@ yy916:
yy917:
YYDEBUG(917, *YYCURSOR);
#line 1201 "parse_date.re"
#line 1200 "parse_date.re"
{
timelib_sll w, d;
@ -11040,7 +11040,7 @@ yy917:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 9189 "<stdout>"
#line 9188 "<stdout>"
yy918:
YYDEBUG(918, *YYCURSOR);
++YYCURSOR;
@ -11048,7 +11048,7 @@ yy918:
yy919:
YYDEBUG(919, *YYCURSOR);
#line 1182 "parse_date.re"
#line 1181 "parse_date.re"
{
timelib_sll w, d;
@ -11066,7 +11066,7 @@ yy919:
TIMELIB_DEINIT;
return TIMELIB_ISO_WEEK;
}
#line 9211 "<stdout>"
#line 9210 "<stdout>"
yy920:
YYDEBUG(920, *YYCURSOR);
yych = *++YYCURSOR;
@ -11099,7 +11099,7 @@ yy922:
yy923:
YYDEBUG(923, *YYCURSOR);
#line 1170 "parse_date.re"
#line 1169 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -11110,7 +11110,7 @@ yy923:
TIMELIB_DEINIT;
return TIMELIB_PG_YEARDAY;
}
#line 9247 "<stdout>"
#line 9246 "<stdout>"
yy924:
YYDEBUG(924, *YYCURSOR);
yych = *++YYCURSOR;
@ -11186,7 +11186,7 @@ yy929:
yy930:
YYDEBUG(930, *YYCURSOR);
#line 1140 "parse_date.re"
#line 1139 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -11196,7 +11196,7 @@ yy930:
TIMELIB_DEINIT;
return TIMELIB_DATE_NOCOLON;
}
#line 9319 "<stdout>"
#line 9318 "<stdout>"
yy931:
YYDEBUG(931, *YYCURSOR);
yych = *++YYCURSOR;
@ -11264,7 +11264,7 @@ yy940:
yy941:
YYDEBUG(941, *YYCURSOR);
#line 1151 "parse_date.re"
#line 1150 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_TIME();
@ -11282,7 +11282,7 @@ yy941:
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
#line 9383 "<stdout>"
#line 9382 "<stdout>"
yy942:
YYDEBUG(942, *YYCURSOR);
yych = *++YYCURSOR;
@ -11963,7 +11963,7 @@ yy1034:
yy1035:
YYDEBUG(1035, *YYCURSOR);
#line 1057 "parse_date.re"
#line 1056 "parse_date.re"
{
TIMELIB_INIT;
TIMELIB_HAVE_DATE();
@ -11973,7 +11973,7 @@ yy1035:
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
#line 9886 "<stdout>"
#line 9885 "<stdout>"
yy1036:
YYDEBUG(1036, *YYCURSOR);
yych = *++YYCURSOR;
@ -12756,7 +12756,7 @@ yy1115:
yy1116:
YYDEBUG(1116, *YYCURSOR);
#line 982 "parse_date.re"
#line 981 "parse_date.re"
{
DEBUG_OUTPUT("gnunocolon");
TIMELIB_INIT;
@ -12777,7 +12777,7 @@ yy1116:
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
#line 10524 "<stdout>"
#line 10523 "<stdout>"
yy1117:
YYDEBUG(1117, *YYCURSOR);
yych = *++YYCURSOR;
@ -12850,7 +12850,7 @@ yy1123:
yy1124:
YYDEBUG(1124, *YYCURSOR);
#line 1027 "parse_date.re"
#line 1026 "parse_date.re"
{
DEBUG_OUTPUT("iso8601nocolon");
TIMELIB_INIT;
@ -12865,7 +12865,7 @@ yy1124:
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
#line 10596 "<stdout>"
#line 10595 "<stdout>"
yy1125:
YYDEBUG(1125, *YYCURSOR);
yyaccept = 19;
@ -13049,7 +13049,7 @@ yy1140:
yy1141:
YYDEBUG(1141, *YYCURSOR);
#line 921 "parse_date.re"
#line 920 "parse_date.re"
{
timelib_ull i;
@ -13072,7 +13072,7 @@ yy1141:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 10767 "<stdout>"
#line 10766 "<stdout>"
yy1142:
YYDEBUG(1142, *YYCURSOR);
yych = *++YYCURSOR;
@ -13120,7 +13120,7 @@ yy1149:
yy1150:
YYDEBUG(1150, *YYCURSOR);
#line 909 "parse_date.re"
#line 908 "parse_date.re"
{
DEBUG_OUTPUT("tomorrow");
TIMELIB_INIT;
@ -13131,7 +13131,7 @@ yy1150:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 10808 "<stdout>"
#line 10807 "<stdout>"
yy1151:
YYDEBUG(1151, *YYCURSOR);
yych = *++YYCURSOR;
@ -13148,7 +13148,7 @@ yy1152:
yy1153:
YYDEBUG(1153, *YYCURSOR);
#line 899 "parse_date.re"
#line 898 "parse_date.re"
{
DEBUG_OUTPUT("today");
TIMELIB_INIT;
@ -13157,7 +13157,7 @@ yy1153:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 10828 "<stdout>"
#line 10827 "<stdout>"
yy1154:
YYDEBUG(1154, *YYCURSOR);
yych = *++YYCURSOR;
@ -13180,7 +13180,7 @@ yy1155:
yy1156:
YYDEBUG(1156, *YYCURSOR);
#line 890 "parse_date.re"
#line 889 "parse_date.re"
{
DEBUG_OUTPUT("now");
TIMELIB_INIT;
@ -13188,7 +13188,7 @@ yy1156:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 10853 "<stdout>"
#line 10852 "<stdout>"
yy1157:
YYDEBUG(1157, *YYCURSOR);
yych = *++YYCURSOR;
@ -13235,7 +13235,7 @@ yy1164:
yy1165:
YYDEBUG(1165, *YYCURSOR);
#line 878 "parse_date.re"
#line 877 "parse_date.re"
{
DEBUG_OUTPUT("yesterday");
TIMELIB_INIT;
@ -13246,10 +13246,10 @@ yy1165:
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
#line 10893 "<stdout>"
#line 10892 "<stdout>"
}
}
#line 1375 "parse_date.re"
#line 1374 "parse_date.re"
}

View File

@ -32,7 +32,6 @@
#endif
#if defined(_MSC_VER)
# define strcasecmp stricmp
# define strtoll(s, f, b) _atoi64(s)
#elif !defined(HAVE_STRTOLL)
# if defined(HAVE_ATOLL)

View File

@ -32,7 +32,6 @@
#endif
#if defined(_MSC_VER)
# define strcasecmp stricmp
# define strtoll(s, f, b) _atoi64(s)
#elif !defined(HAVE_STRTOLL)
# if defined(HAVE_ATOLL)