-/* Generated by re2c 0.9.11.rc1 on Mon Dec 12 21:29:37 2005 */
+/* Generated by re2c 0.9.11.rc1 on Fri Dec 16 17:38:44 2005 */
#line 1 "ext/date/lib/parse_date.re"
/*
+----------------------------------------------------------------------+
yy3:
YYDEBUG(3, *YYCURSOR);
-#line 1321 "ext/date/lib/parse_date.re"
+#line 1323 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("tzcorrection | tz");
yy8:
YYDEBUG(8, *YYCURSOR);
-#line 1387 "ext/date/lib/parse_date.re"
+#line 1389 "ext/date/lib/parse_date.re"
{
/* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */
s->errors++;
yy45:
YYDEBUG(45, *YYCURSOR);
-#line 1376 "ext/date/lib/parse_date.re"
+#line 1378 "ext/date/lib/parse_date.re"
{
goto std;
}
yy48:
YYDEBUG(48, *YYCURSOR);
-#line 1381 "ext/date/lib/parse_date.re"
+#line 1383 "ext/date/lib/parse_date.re"
{
s->pos = cursor; s->line++;
goto std;
yy68:
YYDEBUG(68, *YYCURSOR);
-#line 1360 "ext/date/lib/parse_date.re"
+#line 1362 "ext/date/lib/parse_date.re"
{
timelib_ull i;
DEBUG_OUTPUT("relative");
yy173:
YYDEBUG(173, *YYCURSOR);
-#line 1304 "ext/date/lib/parse_date.re"
+#line 1306 "ext/date/lib/parse_date.re"
{
timelib_sll i;
int behavior;
yy342:
YYDEBUG(342, *YYCURSOR);
-#line 1288 "ext/date/lib/parse_date.re"
+#line 1290 "ext/date/lib/parse_date.re"
{
const timelib_relunit* relunit;
DEBUG_OUTPUT("daytext");
yy432:
YYDEBUG(432, *YYCURSOR);
-#line 1332 "ext/date/lib/parse_date.re"
+#line 1334 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
yy495:
YYDEBUG(495, *YYCURSOR);
-#line 1219 "ext/date/lib/parse_date.re"
+#line 1221 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextshort");
TIMELIB_INIT;
yy597:
YYDEBUG(597, *YYCURSOR);
-#line 1273 "ext/date/lib/parse_date.re"
+#line 1275 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("ago");
TIMELIB_INIT;
yy903:
YYDEBUG(903, *YYCURSOR);
-#line 1245 "ext/date/lib/parse_date.re"
+#line 1247 "ext/date/lib/parse_date.re"
{
int tz_not_found;
DEBUG_OUTPUT("clf");
yy956:
YYDEBUG(956, *YYCURSOR);
-#line 1232 "ext/date/lib/parse_date.re"
+#line 1234 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgtextreverse");
TIMELIB_INIT;
yy968:
YYDEBUG(968, *YYCURSOR);
-#line 1264 "ext/date/lib/parse_date.re"
+#line 1266 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("year4");
TIMELIB_INIT;
yy997:
YYDEBUG(997, *YYCURSOR);
-#line 1200 "ext/date/lib/parse_date.re"
+#line 1202 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweek");
yy999:
YYDEBUG(999, *YYCURSOR);
-#line 1181 "ext/date/lib/parse_date.re"
+#line 1183 "ext/date/lib/parse_date.re"
{
timelib_sll w, d;
DEBUG_OUTPUT("isoweekday");
yy1003:
YYDEBUG(1003, *YYCURSOR);
-#line 1168 "ext/date/lib/parse_date.re"
+#line 1170 "ext/date/lib/parse_date.re"
{
DEBUG_OUTPUT("pgydotd");
TIMELIB_INIT;
s->time->s = timelib_get_nr((char **) &ptr, 2);
if (*ptr == '.') {
s->time->f = timelib_get_frac_nr((char **) &ptr, 9);
- s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb);
- s->errors += tz_not_found;
+ if (*ptr) { /* timezone is optional */
+ s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb);
+ s->errors += tz_not_found;
+ }
}
TIMELIB_DEINIT;
return TIMELIB_XMLRPC_SOAP;
}
-#line 12653 "ext/date/lib/parse_date.c"
+#line 12655 "ext/date/lib/parse_date.c"
yy1022:
YYDEBUG(1022, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_ISO_DATE;
}
-#line 13106 "ext/date/lib/parse_date.c"
+#line 13108 "ext/date/lib/parse_date.c"
yy1113:
YYDEBUG(1113, *YYCURSOR);
yyaccept = 19;
goto yy1161;
yy1161:
YYDEBUG(1161, *YYCURSOR);
- ++YYCURSOR;
+ yyaccept = 20;
+ YYMARKER = ++YYCURSOR;
if((YYLIMIT - YYCURSOR) < 6) YYFILL(6);
yych = *YYCURSOR;
goto yy1162;
yy1162:
YYDEBUG(1162, *YYCURSOR);
if(yych <= ','){
- if(yych != '+') goto yy52;
+ if(yych != '+') goto yy1021;
goto yy1163;
} else {
if(yych <= '-') goto yy1163;
- if(yych <= '/') goto yy52;
+ if(yych <= '/') goto yy1021;
if(yych <= '9') goto yy1161;
- goto yy52;
+ goto yy1021;
}
yy1163:
YYDEBUG(1163, *YYCURSOR);
TIMELIB_DEINIT;
return TIMELIB_GNU_NOCOLON;
}
-#line 14031 "ext/date/lib/parse_date.c"
+#line 14034 "ext/date/lib/parse_date.c"
yy1206:
YYDEBUG(1206, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_ISO_NOCOLON;
}
-#line 14129 "ext/date/lib/parse_date.c"
+#line 14132 "ext/date/lib/parse_date.c"
yy1214:
YYDEBUG(1214, *YYCURSOR);
yyaccept = 22;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14451 "ext/date/lib/parse_date.c"
+#line 14454 "ext/date/lib/parse_date.c"
yy1239:
YYDEBUG(1239, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14526 "ext/date/lib/parse_date.c"
+#line 14529 "ext/date/lib/parse_date.c"
yy1248:
YYDEBUG(1248, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14543 "ext/date/lib/parse_date.c"
+#line 14546 "ext/date/lib/parse_date.c"
yy1251:
YYDEBUG(1251, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14628 "ext/date/lib/parse_date.c"
+#line 14631 "ext/date/lib/parse_date.c"
yy1260:
YYDEBUG(1260, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14659 "ext/date/lib/parse_date.c"
+#line 14662 "ext/date/lib/parse_date.c"
yy1263:
YYDEBUG(1263, *YYCURSOR);
yych = *++YYCURSOR;
TIMELIB_DEINIT;
return TIMELIB_RELATIVE;
}
-#line 14721 "ext/date/lib/parse_date.c"
+#line 14724 "ext/date/lib/parse_date.c"
}
}
-#line 1392 "ext/date/lib/parse_date.re"
+#line 1394 "ext/date/lib/parse_date.re"
}