|
|
|
@ -1,4 +1,4 @@ |
|
|
|
/* Generated by re2c 0.9.10.dev on Sat Oct 1 16:59:40 2005 */ |
|
|
|
/* Generated by re2c 0.9.10.dev on Mon Oct 3 13:06:54 2005 */ |
|
|
|
#line 1 "resource/parse_date.re" |
|
|
|
/* |
|
|
|
+----------------------------------------------------------------------+ |
|
|
|
@ -144,6 +144,7 @@ typedef struct Scanner { |
|
|
|
int errors; |
|
|
|
|
|
|
|
struct timelib_time *time; |
|
|
|
timelib_tzdb *tzdb; |
|
|
|
} Scanner; |
|
|
|
|
|
|
|
typedef struct _timelib_lookup_table { |
|
|
|
@ -617,7 +618,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found |
|
|
|
return value; |
|
|
|
} |
|
|
|
|
|
|
|
static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found) |
|
|
|
static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, timelib_tzdb *tzdb) |
|
|
|
{ |
|
|
|
timelib_tzinfo *res; |
|
|
|
|
|
|
|
@ -659,7 +660,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_ |
|
|
|
#endif |
|
|
|
/* If we have a TimeZone identifier to start with, use it */ |
|
|
|
if (strstr(tz_abbr, "/")) { |
|
|
|
if ((res = timelib_parse_tzfile(tz_abbr)) != NULL) { |
|
|
|
if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) { |
|
|
|
t->tz_info = res; |
|
|
|
t->zone_type = TIMELIB_ZONETYPE_ID; |
|
|
|
found++; |
|
|
|
@ -692,7 +693,7 @@ static int scan(Scanner *s) |
|
|
|
std: |
|
|
|
s->tok = cursor; |
|
|
|
s->len = 0; |
|
|
|
#line 798 "resource/parse_date.re" |
|
|
|
#line 799 "resource/parse_date.re" |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
@ -731,7 +732,7 @@ std: |
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, |
|
|
|
}; |
|
|
|
|
|
|
|
#line 735 "<stdout>" |
|
|
|
#line 736 "<stdout>" |
|
|
|
{ |
|
|
|
YYCTYPE yych; |
|
|
|
unsigned int yyaccept; |
|
|
|
@ -816,17 +817,17 @@ yy2: |
|
|
|
yy3: |
|
|
|
YYDEBUG(3, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1280 "resource/parse_date.re" |
|
|
|
#line 1281 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("tzcorrection | tz"); |
|
|
|
TIMELIB_INIT; |
|
|
|
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found); |
|
|
|
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_TIMEZONE; |
|
|
|
} |
|
|
|
#line 823 "<stdout>" |
|
|
|
#line 824 "<stdout>" |
|
|
|
yy4: |
|
|
|
YYDEBUG(4, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -912,13 +913,13 @@ yy6: |
|
|
|
yy7: |
|
|
|
YYDEBUG(7, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1346 "resource/parse_date.re" |
|
|
|
#line 1347 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
/* printf("unexpected character: #%d, %c ", *s->tok, *s->tok); */ |
|
|
|
s->errors++; |
|
|
|
goto std; |
|
|
|
} |
|
|
|
#line 906 "<stdout>" |
|
|
|
#line 907 "<stdout>" |
|
|
|
yy8: |
|
|
|
YYDEBUG(8, *YYCURSOR); |
|
|
|
yyaccept = 0; |
|
|
|
@ -1841,11 +1842,11 @@ yy43: |
|
|
|
yy44: |
|
|
|
YYDEBUG(44, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1335 "resource/parse_date.re" |
|
|
|
#line 1336 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
goto std; |
|
|
|
} |
|
|
|
#line 1754 "<stdout>" |
|
|
|
#line 1755 "<stdout>" |
|
|
|
yy45: |
|
|
|
YYDEBUG(45, *YYCURSOR); |
|
|
|
++YYCURSOR; |
|
|
|
@ -1853,12 +1854,12 @@ yy45: |
|
|
|
yy46: |
|
|
|
YYDEBUG(46, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1340 "resource/parse_date.re" |
|
|
|
#line 1341 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
s->pos = cursor; s->line++; |
|
|
|
goto std; |
|
|
|
} |
|
|
|
#line 1763 "<stdout>" |
|
|
|
#line 1764 "<stdout>" |
|
|
|
yy47: |
|
|
|
YYDEBUG(47, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -2316,7 +2317,7 @@ yy84: |
|
|
|
yy85: |
|
|
|
YYDEBUG(85, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1319 "resource/parse_date.re" |
|
|
|
#line 1320 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
timelib_ull i; |
|
|
|
DEBUG_OUTPUT("relative"); |
|
|
|
@ -2331,7 +2332,7 @@ yy85: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 2153 "<stdout>" |
|
|
|
#line 2154 "<stdout>" |
|
|
|
yy86: |
|
|
|
YYDEBUG(86, *YYCURSOR); |
|
|
|
++YYCURSOR; |
|
|
|
@ -3024,12 +3025,12 @@ yy150: |
|
|
|
yy151: |
|
|
|
YYDEBUG(151, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1274 "resource/parse_date.re" |
|
|
|
#line 1275 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("dayabbr"); |
|
|
|
goto std; |
|
|
|
} |
|
|
|
#line 2717 "<stdout>" |
|
|
|
#line 2718 "<stdout>" |
|
|
|
yy152: |
|
|
|
YYDEBUG(152, *YYCURSOR); |
|
|
|
yyaccept = 1; |
|
|
|
@ -3068,7 +3069,7 @@ yy157: |
|
|
|
yy158: |
|
|
|
YYDEBUG(158, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1258 "resource/parse_date.re" |
|
|
|
#line 1259 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
const timelib_relunit* relunit; |
|
|
|
DEBUG_OUTPUT("dayfull"); |
|
|
|
@ -3083,7 +3084,7 @@ yy158: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 2757 "<stdout>" |
|
|
|
#line 2758 "<stdout>" |
|
|
|
yy159: |
|
|
|
YYDEBUG(159, *YYCURSOR); |
|
|
|
yyaccept = 1; |
|
|
|
@ -3452,7 +3453,7 @@ yy189: |
|
|
|
yy190: |
|
|
|
YYDEBUG(190, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1242 "resource/parse_date.re" |
|
|
|
#line 1243 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
timelib_sll i; |
|
|
|
DEBUG_OUTPUT("relativetext"); |
|
|
|
@ -3467,7 +3468,7 @@ yy190: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 3075 "<stdout>" |
|
|
|
#line 3076 "<stdout>" |
|
|
|
yy191: |
|
|
|
YYDEBUG(191, *YYCURSOR); |
|
|
|
++YYCURSOR; |
|
|
|
@ -9097,7 +9098,7 @@ yy508: |
|
|
|
yy509: |
|
|
|
YYDEBUG(509, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1064 "resource/parse_date.re" |
|
|
|
#line 1065 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datetextual | datenoyear"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -9109,7 +9110,7 @@ yy509: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_TEXT; |
|
|
|
} |
|
|
|
#line 8068 "<stdout>" |
|
|
|
#line 8069 "<stdout>" |
|
|
|
yy510: |
|
|
|
YYDEBUG(510, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -9269,7 +9270,7 @@ yy526: |
|
|
|
yy527: |
|
|
|
YYDEBUG(527, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1291 "resource/parse_date.re" |
|
|
|
#line 1292 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); |
|
|
|
@ -9290,13 +9291,13 @@ yy527: |
|
|
|
} |
|
|
|
|
|
|
|
if (*ptr != '\0') { |
|
|
|
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found); |
|
|
|
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_SHORTDATE_WITH_TIME; |
|
|
|
} |
|
|
|
#line 8219 "<stdout>" |
|
|
|
#line 8220 "<stdout>" |
|
|
|
yy528: |
|
|
|
YYDEBUG(528, *YYCURSOR); |
|
|
|
yyaccept = 7; |
|
|
|
@ -9609,7 +9610,7 @@ yy561: |
|
|
|
yy562: |
|
|
|
YYDEBUG(562, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1038 "resource/parse_date.re" |
|
|
|
#line 1039 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datenoday"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -9621,7 +9622,7 @@ yy562: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_NO_DAY; |
|
|
|
} |
|
|
|
#line 8474 "<stdout>" |
|
|
|
#line 8475 "<stdout>" |
|
|
|
yy563: |
|
|
|
YYDEBUG(563, *YYCURSOR); |
|
|
|
yyaccept = 6; |
|
|
|
@ -9921,7 +9922,7 @@ yy587: |
|
|
|
yy588: |
|
|
|
YYDEBUG(588, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1173 "resource/parse_date.re" |
|
|
|
#line 1174 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("pgtextshort"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -9933,7 +9934,7 @@ yy588: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_PG_TEXT; |
|
|
|
} |
|
|
|
#line 8733 "<stdout>" |
|
|
|
#line 8734 "<stdout>" |
|
|
|
yy589: |
|
|
|
YYDEBUG(589, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -11437,7 +11438,7 @@ yy683: |
|
|
|
yy684: |
|
|
|
YYDEBUG(684, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1227 "resource/parse_date.re" |
|
|
|
#line 1228 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("ago"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -11451,7 +11452,7 @@ yy684: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_AGO; |
|
|
|
} |
|
|
|
#line 10058 "<stdout>" |
|
|
|
#line 10059 "<stdout>" |
|
|
|
yy685: |
|
|
|
YYDEBUG(685, *YYCURSOR); |
|
|
|
yyaccept = 1; |
|
|
|
@ -13385,7 +13386,7 @@ yy787: |
|
|
|
yy788: |
|
|
|
YYDEBUG(788, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1077 "resource/parse_date.re" |
|
|
|
#line 1078 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datenoyearrev"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -13395,7 +13396,7 @@ yy788: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_TEXT; |
|
|
|
} |
|
|
|
#line 11790 "<stdout>" |
|
|
|
#line 11791 "<stdout>" |
|
|
|
yy789: |
|
|
|
YYDEBUG(789, *YYCURSOR); |
|
|
|
yyaccept = 10; |
|
|
|
@ -13488,7 +13489,7 @@ yy796: |
|
|
|
yy797: |
|
|
|
YYDEBUG(797, *YYCURSOR); |
|
|
|
|
|
|
|
#line 885 "resource/parse_date.re" |
|
|
|
#line 886 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); |
|
|
|
@ -13505,13 +13506,13 @@ yy797: |
|
|
|
} |
|
|
|
|
|
|
|
if (*ptr != '\0') { |
|
|
|
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found); |
|
|
|
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_TIME24_WITH_ZONE; |
|
|
|
} |
|
|
|
#line 11888 "<stdout>" |
|
|
|
#line 11889 "<stdout>" |
|
|
|
yy798: |
|
|
|
YYDEBUG(798, *YYCURSOR); |
|
|
|
yyaccept = 11; |
|
|
|
@ -13639,7 +13640,7 @@ yy811: |
|
|
|
yy812: |
|
|
|
YYDEBUG(812, *YYCURSOR); |
|
|
|
|
|
|
|
#line 870 "resource/parse_date.re" |
|
|
|
#line 871 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("timeshort12 | timelong12"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -13653,7 +13654,7 @@ yy812: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_TIME12; |
|
|
|
} |
|
|
|
#line 12000 "<stdout>" |
|
|
|
#line 12001 "<stdout>" |
|
|
|
yy813: |
|
|
|
YYDEBUG(813, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -13776,7 +13777,7 @@ yy824: |
|
|
|
yy825: |
|
|
|
YYDEBUG(825, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1012 "resource/parse_date.re" |
|
|
|
#line 1013 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datefull"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -13788,7 +13789,7 @@ yy825: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_FULL; |
|
|
|
} |
|
|
|
#line 12109 "<stdout>" |
|
|
|
#line 12110 "<stdout>" |
|
|
|
yy826: |
|
|
|
YYDEBUG(826, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -14407,7 +14408,7 @@ yy892: |
|
|
|
yy893: |
|
|
|
YYDEBUG(893, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1025 "resource/parse_date.re" |
|
|
|
#line 1026 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("pointed date"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -14419,7 +14420,7 @@ yy893: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_FULL_POINTED; |
|
|
|
} |
|
|
|
#line 12604 "<stdout>" |
|
|
|
#line 12605 "<stdout>" |
|
|
|
yy894: |
|
|
|
YYDEBUG(894, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -14987,7 +14988,7 @@ yy938: |
|
|
|
yy939: |
|
|
|
YYDEBUG(939, *YYCURSOR); |
|
|
|
|
|
|
|
#line 999 "resource/parse_date.re" |
|
|
|
#line 1000 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("gnudateshort"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -14999,7 +15000,7 @@ yy939: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_ISO_DATE; |
|
|
|
} |
|
|
|
#line 13092 "<stdout>" |
|
|
|
#line 13093 "<stdout>" |
|
|
|
yy940: |
|
|
|
YYDEBUG(940, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -15021,7 +15022,7 @@ yy942: |
|
|
|
yy943: |
|
|
|
YYDEBUG(943, *YYCURSOR); |
|
|
|
|
|
|
|
#line 972 "resource/parse_date.re" |
|
|
|
#line 973 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("americanshort | american"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -15035,7 +15036,7 @@ yy943: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_AMERICAN; |
|
|
|
} |
|
|
|
#line 13120 "<stdout>" |
|
|
|
#line 13121 "<stdout>" |
|
|
|
yy944: |
|
|
|
YYDEBUG(944, *YYCURSOR); |
|
|
|
yyaccept = 12; |
|
|
|
@ -15257,7 +15258,7 @@ yy975: |
|
|
|
yy976: |
|
|
|
YYDEBUG(976, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1199 "resource/parse_date.re" |
|
|
|
#line 1200 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("clf"); |
|
|
|
@ -15270,12 +15271,12 @@ yy976: |
|
|
|
s->time->h = timelib_get_nr((char **) &ptr, 2); |
|
|
|
s->time->i = timelib_get_nr((char **) &ptr, 2); |
|
|
|
s->time->s = timelib_get_nr((char **) &ptr, 2); |
|
|
|
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found); |
|
|
|
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_CLF; |
|
|
|
} |
|
|
|
#line 13294 "<stdout>" |
|
|
|
#line 13295 "<stdout>" |
|
|
|
yy977: |
|
|
|
YYDEBUG(977, *YYCURSOR); |
|
|
|
yyaccept = 13; |
|
|
|
@ -15584,7 +15585,7 @@ yy1015: |
|
|
|
yy1016: |
|
|
|
YYDEBUG(1016, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1186 "resource/parse_date.re" |
|
|
|
#line 1187 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("pgtextreverse"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -15596,7 +15597,7 @@ yy1016: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_PG_TEXT; |
|
|
|
} |
|
|
|
#line 13534 "<stdout>" |
|
|
|
#line 13535 "<stdout>" |
|
|
|
yy1017: |
|
|
|
YYDEBUG(1017, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -15729,7 +15730,7 @@ yy1027: |
|
|
|
yy1028: |
|
|
|
YYDEBUG(1028, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1218 "resource/parse_date.re" |
|
|
|
#line 1219 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("year4"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -15737,7 +15738,7 @@ yy1028: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_CLF; |
|
|
|
} |
|
|
|
#line 13650 "<stdout>" |
|
|
|
#line 13651 "<stdout>" |
|
|
|
yy1029: |
|
|
|
YYDEBUG(1029, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -15873,7 +15874,7 @@ yy1036: |
|
|
|
yy1037: |
|
|
|
YYDEBUG(1037, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1051 "resource/parse_date.re" |
|
|
|
#line 1052 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datenodayrev"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -15885,7 +15886,7 @@ yy1037: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_NO_DAY; |
|
|
|
} |
|
|
|
#line 13777 "<stdout>" |
|
|
|
#line 13778 "<stdout>" |
|
|
|
yy1038: |
|
|
|
YYDEBUG(1038, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -16094,7 +16095,7 @@ yy1056: |
|
|
|
yy1057: |
|
|
|
YYDEBUG(1057, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1154 "resource/parse_date.re" |
|
|
|
#line 1155 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
timelib_sll w, d; |
|
|
|
DEBUG_OUTPUT("isoweek"); |
|
|
|
@ -16112,7 +16113,7 @@ yy1057: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_ISO_WEEK; |
|
|
|
} |
|
|
|
#line 13964 "<stdout>" |
|
|
|
#line 13965 "<stdout>" |
|
|
|
yy1058: |
|
|
|
YYDEBUG(1058, *YYCURSOR); |
|
|
|
++YYCURSOR; |
|
|
|
@ -16120,7 +16121,7 @@ yy1058: |
|
|
|
yy1059: |
|
|
|
YYDEBUG(1059, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1135 "resource/parse_date.re" |
|
|
|
#line 1136 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
timelib_sll w, d; |
|
|
|
DEBUG_OUTPUT("isoweekday"); |
|
|
|
@ -16138,7 +16139,7 @@ yy1059: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_ISO_WEEK; |
|
|
|
} |
|
|
|
#line 13986 "<stdout>" |
|
|
|
#line 13987 "<stdout>" |
|
|
|
yy1060: |
|
|
|
YYDEBUG(1060, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -16207,7 +16208,7 @@ yy1062: |
|
|
|
yy1063: |
|
|
|
YYDEBUG(1063, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1122 "resource/parse_date.re" |
|
|
|
#line 1123 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("pgydotd"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -16219,7 +16220,7 @@ yy1063: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_PG_YEARDAY; |
|
|
|
} |
|
|
|
#line 14059 "<stdout>" |
|
|
|
#line 14060 "<stdout>" |
|
|
|
yy1064: |
|
|
|
YYDEBUG(1064, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -16334,7 +16335,7 @@ yy1069: |
|
|
|
yy1070: |
|
|
|
YYDEBUG(1070, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1088 "resource/parse_date.re" |
|
|
|
#line 1089 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("datenocolon"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -16345,7 +16346,7 @@ yy1070: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_DATE_NOCOLON; |
|
|
|
} |
|
|
|
#line 14167 "<stdout>" |
|
|
|
#line 14168 "<stdout>" |
|
|
|
yy1071: |
|
|
|
YYDEBUG(1071, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -16443,7 +16444,7 @@ yy1080: |
|
|
|
yy1081: |
|
|
|
YYDEBUG(1081, *YYCURSOR); |
|
|
|
|
|
|
|
#line 1100 "resource/parse_date.re" |
|
|
|
#line 1101 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx"); |
|
|
|
@ -16458,13 +16459,13 @@ yy1081: |
|
|
|
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->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 14264 "<stdout>" |
|
|
|
#line 14265 "<stdout>" |
|
|
|
yy1082: |
|
|
|
YYDEBUG(1082, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -17067,7 +17068,7 @@ yy1171: |
|
|
|
yy1172: |
|
|
|
YYDEBUG(1172, *YYCURSOR); |
|
|
|
|
|
|
|
#line 987 "resource/parse_date.re" |
|
|
|
#line 988 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("iso8601date | iso8601dateslash | dateslash"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -17078,7 +17079,7 @@ yy1172: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_ISO_DATE; |
|
|
|
} |
|
|
|
#line 14696 "<stdout>" |
|
|
|
#line 14697 "<stdout>" |
|
|
|
yy1173: |
|
|
|
YYDEBUG(1173, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -17851,7 +17852,7 @@ yy1262: |
|
|
|
yy1263: |
|
|
|
YYDEBUG(1263, *YYCURSOR); |
|
|
|
|
|
|
|
#line 909 "resource/parse_date.re" |
|
|
|
#line 910 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("gnunocolon"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -17872,7 +17873,7 @@ yy1263: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_GNU_NOCOLON; |
|
|
|
} |
|
|
|
#line 15306 "<stdout>" |
|
|
|
#line 15307 "<stdout>" |
|
|
|
yy1264: |
|
|
|
YYDEBUG(1264, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -17969,7 +17970,7 @@ yy1270: |
|
|
|
yy1271: |
|
|
|
YYDEBUG(1271, *YYCURSOR); |
|
|
|
|
|
|
|
#line 954 "resource/parse_date.re" |
|
|
|
#line 955 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
int tz_not_found; |
|
|
|
DEBUG_OUTPUT("iso8601nocolon"); |
|
|
|
@ -17980,13 +17981,13 @@ yy1271: |
|
|
|
s->time->s = timelib_get_nr((char **) &ptr, 2); |
|
|
|
|
|
|
|
if (*ptr != '\0') { |
|
|
|
s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found); |
|
|
|
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_ISO_NOCOLON; |
|
|
|
} |
|
|
|
#line 15404 "<stdout>" |
|
|
|
#line 15405 "<stdout>" |
|
|
|
yy1272: |
|
|
|
YYDEBUG(1272, *YYCURSOR); |
|
|
|
yyaccept = 21; |
|
|
|
@ -18283,7 +18284,7 @@ yy1295: |
|
|
|
yy1296: |
|
|
|
YYDEBUG(1296, *YYCURSOR); |
|
|
|
|
|
|
|
#line 846 "resource/parse_date.re" |
|
|
|
#line 847 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
timelib_ull i; |
|
|
|
|
|
|
|
@ -18306,7 +18307,7 @@ yy1296: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 15668 "<stdout>" |
|
|
|
#line 15669 "<stdout>" |
|
|
|
yy1297: |
|
|
|
YYDEBUG(1297, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -18377,7 +18378,7 @@ yy1304: |
|
|
|
yy1305: |
|
|
|
YYDEBUG(1305, *YYCURSOR); |
|
|
|
|
|
|
|
#line 834 "resource/parse_date.re" |
|
|
|
#line 835 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("tomorrow"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -18388,7 +18389,7 @@ yy1305: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 15732 "<stdout>" |
|
|
|
#line 15733 "<stdout>" |
|
|
|
yy1306: |
|
|
|
YYDEBUG(1306, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -18401,7 +18402,7 @@ yy1307: |
|
|
|
yy1308: |
|
|
|
YYDEBUG(1308, *YYCURSOR); |
|
|
|
|
|
|
|
#line 824 "resource/parse_date.re" |
|
|
|
#line 825 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("today"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -18410,7 +18411,7 @@ yy1308: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 15748 "<stdout>" |
|
|
|
#line 15749 "<stdout>" |
|
|
|
yy1309: |
|
|
|
YYDEBUG(1309, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -18444,7 +18445,7 @@ yy1310: |
|
|
|
yy1311: |
|
|
|
YYDEBUG(1311, *YYCURSOR); |
|
|
|
|
|
|
|
#line 815 "resource/parse_date.re" |
|
|
|
#line 816 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("now"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -18452,7 +18453,7 @@ yy1311: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 15784 "<stdout>" |
|
|
|
#line 15785 "<stdout>" |
|
|
|
yy1312: |
|
|
|
YYDEBUG(1312, *YYCURSOR); |
|
|
|
yych = *++YYCURSOR; |
|
|
|
@ -18510,7 +18511,7 @@ yy1319: |
|
|
|
yy1320: |
|
|
|
YYDEBUG(1320, *YYCURSOR); |
|
|
|
|
|
|
|
#line 803 "resource/parse_date.re" |
|
|
|
#line 804 "resource/parse_date.re" |
|
|
|
{ |
|
|
|
DEBUG_OUTPUT("yesterday"); |
|
|
|
TIMELIB_INIT; |
|
|
|
@ -18521,17 +18522,17 @@ yy1320: |
|
|
|
TIMELIB_DEINIT; |
|
|
|
return TIMELIB_RELATIVE; |
|
|
|
} |
|
|
|
#line 15835 "<stdout>" |
|
|
|
#line 15836 "<stdout>" |
|
|
|
} |
|
|
|
} |
|
|
|
#line 1351 "resource/parse_date.re" |
|
|
|
#line 1352 "resource/parse_date.re" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
#define YYMAXFILL 26 |
|
|
|
|
|
|
|
|
|
|
|
timelib_time* timelib_strtotime(char *s, int *errors) |
|
|
|
timelib_time* timelib_strtotime(char *s, int *errors, timelib_tzdb *tzdb) |
|
|
|
{ |
|
|
|
Scanner in; |
|
|
|
int t; |
|
|
|
@ -18553,6 +18554,7 @@ timelib_time* timelib_strtotime(char *s, int *errors) |
|
|
|
in.time->z = -1; |
|
|
|
in.time->dst = -1; |
|
|
|
in.errors = 0; |
|
|
|
in.tzdb = tzdb; |
|
|
|
|
|
|
|
do { |
|
|
|
t = scan(&in); |
|
|
|
|