~legolas/ubuntu/natty/php5/5.3.5

« back to all changes in this revision

Viewing changes to ext/date/lib/parse_date.c.orig

  • Committer: Stas Verberkt
  • Date: 2011-02-01 09:27:15 UTC
  • Revision ID: legolas@legolasweb.nl-20110201092715-yq052iu2yl4i2eyg
Inserted PHP 5.3.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */
 
1
/* Generated by re2c 0.13.5 on Sat Nov 13 14:58:02 2010 */
2
2
#line 1 "ext/date/lib/parse_date.re"
3
3
/*
4
4
   +----------------------------------------------------------------------+
18
18
   +----------------------------------------------------------------------+
19
19
 */
20
20
 
21
 
/* $Id: parse_date.c 301252 2010-07-13 23:59:54Z kalle $ */
 
21
/* $Id: parse_date.c 305316 2010-11-13 15:01:48Z derick $ */
22
22
 
23
23
#include "timelib.h"
24
24
 
843
843
std:
844
844
        s->tok = cursor;
845
845
        s->len = 0;
846
 
#line 967 "ext/date/lib/parse_date.re"
847
 
 
848
 
 
849
 
 
850
 
#line 849 "ext/date/lib/parse_date.c"
 
846
#line 969 "ext/date/lib/parse_date.re"
 
847
 
 
848
 
 
849
 
 
850
#line 851 "ext/date/lib/parse_date.c"
851
851
{
852
852
        YYCTYPE yych;
853
853
        unsigned int yyaccept = 0;
967
967
        }
968
968
yy2:
969
969
        YYDEBUG(2, *YYCURSOR);
970
 
#line 1052 "ext/date/lib/parse_date.re"
 
970
#line 1054 "ext/date/lib/parse_date.re"
971
971
        {
972
972
                DEBUG_OUTPUT("firstdayof | lastdayof");
973
973
                TIMELIB_INIT;
983
983
                TIMELIB_DEINIT;
984
984
                return TIMELIB_LF_DAY_OF_MONTH;
985
985
        }
986
 
#line 985 "ext/date/lib/parse_date.c"
 
986
#line 987 "ext/date/lib/parse_date.c"
987
987
yy3:
988
988
        YYDEBUG(3, *YYCURSOR);
989
989
        ++YYCURSOR;
1006
1006
        }
1007
1007
yy4:
1008
1008
        YYDEBUG(4, *YYCURSOR);
1009
 
#line 1634 "ext/date/lib/parse_date.re"
 
1009
#line 1636 "ext/date/lib/parse_date.re"
1010
1010
        {
1011
1011
                int tz_not_found;
1012
1012
                DEBUG_OUTPUT("tzcorrection | tz");
1019
1019
                TIMELIB_DEINIT;
1020
1020
                return TIMELIB_TIMEZONE;
1021
1021
        }
1022
 
#line 1021 "ext/date/lib/parse_date.c"
 
1022
#line 1023 "ext/date/lib/parse_date.c"
1023
1023
yy5:
1024
1024
        YYDEBUG(5, *YYCURSOR);
1025
1025
        yych = *++YYCURSOR;
1330
1330
        if (yych <= '9') goto yy1385;
1331
1331
yy13:
1332
1332
        YYDEBUG(13, *YYCURSOR);
1333
 
#line 1729 "ext/date/lib/parse_date.re"
 
1333
#line 1731 "ext/date/lib/parse_date.re"
1334
1334
        {
1335
1335
                add_error(s, "Unexpected character");
1336
1336
                goto std;
1337
1337
        }
1338
 
#line 1337 "ext/date/lib/parse_date.c"
 
1338
#line 1339 "ext/date/lib/parse_date.c"
1339
1339
yy14:
1340
1340
        YYDEBUG(14, *YYCURSOR);
1341
1341
        yych = *++YYCURSOR;
2392
2392
        if (yych <= '9') goto yy55;
2393
2393
yy50:
2394
2394
        YYDEBUG(50, *YYCURSOR);
2395
 
#line 1718 "ext/date/lib/parse_date.re"
 
2395
#line 1720 "ext/date/lib/parse_date.re"
2396
2396
        {
2397
2397
                goto std;
2398
2398
        }
2399
 
#line 2398 "ext/date/lib/parse_date.c"
 
2399
#line 2400 "ext/date/lib/parse_date.c"
2400
2400
yy51:
2401
2401
        YYDEBUG(51, *YYCURSOR);
2402
2402
        yych = *++YYCURSOR;
2405
2405
        YYDEBUG(52, *YYCURSOR);
2406
2406
        ++YYCURSOR;
2407
2407
        YYDEBUG(53, *YYCURSOR);
2408
 
#line 1723 "ext/date/lib/parse_date.re"
 
2408
#line 1725 "ext/date/lib/parse_date.re"
2409
2409
        {
2410
2410
                s->pos = cursor; s->line++;
2411
2411
                goto std;
2412
2412
        }
2413
 
#line 2412 "ext/date/lib/parse_date.c"
 
2413
#line 2414 "ext/date/lib/parse_date.c"
2414
2414
yy54:
2415
2415
        YYDEBUG(54, *YYCURSOR);
2416
2416
        yych = *++YYCURSOR;
2797
2797
        if (yych == 's') goto yy74;
2798
2798
yy73:
2799
2799
        YYDEBUG(73, *YYCURSOR);
2800
 
#line 1702 "ext/date/lib/parse_date.re"
 
2800
#line 1704 "ext/date/lib/parse_date.re"
2801
2801
        {
2802
2802
                timelib_ull i;
2803
2803
                DEBUG_OUTPUT("relative");
2812
2812
                TIMELIB_DEINIT;
2813
2813
                return TIMELIB_RELATIVE;
2814
2814
        }
2815
 
#line 2814 "ext/date/lib/parse_date.c"
 
2815
#line 2816 "ext/date/lib/parse_date.c"
2816
2816
yy74:
2817
2817
        YYDEBUG(74, *YYCURSOR);
2818
2818
        yych = *++YYCURSOR;
3574
3574
        }
3575
3575
yy167:
3576
3576
        YYDEBUG(167, *YYCURSOR);
3577
 
#line 1565 "ext/date/lib/parse_date.re"
 
3577
#line 1567 "ext/date/lib/parse_date.re"
3578
3578
        {
3579
3579
                const timelib_relunit* relunit;
3580
3580
                DEBUG_OUTPUT("daytext");
3591
3591
                TIMELIB_DEINIT;
3592
3592
                return TIMELIB_WEEKDAY;
3593
3593
        }
3594
 
#line 3593 "ext/date/lib/parse_date.c"
 
3594
#line 3595 "ext/date/lib/parse_date.c"
3595
3595
yy168:
3596
3596
        YYDEBUG(168, *YYCURSOR);
3597
3597
        yych = *++YYCURSOR;
4111
4111
        }
4112
4112
yy194:
4113
4113
        YYDEBUG(194, *YYCURSOR);
4114
 
#line 1624 "ext/date/lib/parse_date.re"
 
4114
#line 1626 "ext/date/lib/parse_date.re"
4115
4115
        {
4116
4116
                DEBUG_OUTPUT("monthtext");
4117
4117
                TIMELIB_INIT;
4120
4120
                TIMELIB_DEINIT;
4121
4121
                return TIMELIB_DATE_TEXT;
4122
4122
        }
4123
 
#line 4122 "ext/date/lib/parse_date.c"
 
4123
#line 4124 "ext/date/lib/parse_date.c"
4124
4124
yy195:
4125
4125
        YYDEBUG(195, *YYCURSOR);
4126
4126
        ++YYCURSOR;
4171
4171
        }
4172
4172
yy199:
4173
4173
        YYDEBUG(199, *YYCURSOR);
4174
 
#line 1374 "ext/date/lib/parse_date.re"
 
4174
#line 1376 "ext/date/lib/parse_date.re"
4175
4175
        {
4176
4176
                DEBUG_OUTPUT("datetextual | datenoyear");
4177
4177
                TIMELIB_INIT;
4183
4183
                TIMELIB_DEINIT;
4184
4184
                return TIMELIB_DATE_TEXT;
4185
4185
        }
4186
 
#line 4185 "ext/date/lib/parse_date.c"
 
4186
#line 4187 "ext/date/lib/parse_date.c"
4187
4187
yy200:
4188
4188
        YYDEBUG(200, *YYCURSOR);
4189
4189
        yyaccept = 6;
4452
4452
        }
4453
4453
yy223:
4454
4454
        YYDEBUG(223, *YYCURSOR);
4455
 
#line 1672 "ext/date/lib/parse_date.re"
 
4455
#line 1674 "ext/date/lib/parse_date.re"
4456
4456
        {
4457
4457
                int tz_not_found;
4458
4458
                DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz");
4481
4481
                TIMELIB_DEINIT;
4482
4482
                return TIMELIB_SHORTDATE_WITH_TIME;
4483
4483
        }
4484
 
#line 4483 "ext/date/lib/parse_date.c"
 
4484
#line 4485 "ext/date/lib/parse_date.c"
4485
4485
yy224:
4486
4486
        YYDEBUG(224, *YYCURSOR);
4487
4487
        yyaccept = 7;
5179
5179
        YYDEBUG(278, *YYCURSOR);
5180
5180
        ++YYCURSOR;
5181
5181
        YYDEBUG(279, *YYCURSOR);
5182
 
#line 1648 "ext/date/lib/parse_date.re"
 
5182
#line 1650 "ext/date/lib/parse_date.re"
5183
5183
        {
5184
5184
                DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12");
5185
5185
                TIMELIB_INIT;
5202
5202
                TIMELIB_DEINIT;
5203
5203
                return TIMELIB_SHORTDATE_WITH_TIME;
5204
5204
        }
5205
 
#line 5204 "ext/date/lib/parse_date.c"
 
5205
#line 5206 "ext/date/lib/parse_date.c"
5206
5206
yy280:
5207
5207
        YYDEBUG(280, *YYCURSOR);
5208
5208
        yych = *++YYCURSOR;
5380
5380
        ++YYCURSOR;
5381
5381
yy295:
5382
5382
        YYDEBUG(295, *YYCURSOR);
5383
 
#line 1348 "ext/date/lib/parse_date.re"
 
5383
#line 1350 "ext/date/lib/parse_date.re"
5384
5384
        {
5385
5385
                DEBUG_OUTPUT("datenoday");
5386
5386
                TIMELIB_INIT;
5392
5392
                TIMELIB_DEINIT;
5393
5393
                return TIMELIB_DATE_NO_DAY;
5394
5394
        }
5395
 
#line 5394 "ext/date/lib/parse_date.c"
 
5395
#line 5396 "ext/date/lib/parse_date.c"
5396
5396
yy296:
5397
5397
        YYDEBUG(296, *YYCURSOR);
5398
5398
        yych = *++YYCURSOR;
6612
6612
        if (yych <= '9') goto yy365;
6613
6613
yy364:
6614
6614
        YYDEBUG(364, *YYCURSOR);
6615
 
#line 1488 "ext/date/lib/parse_date.re"
 
6615
#line 1490 "ext/date/lib/parse_date.re"
6616
6616
        {
6617
6617
                DEBUG_OUTPUT("pgtextshort");
6618
6618
                TIMELIB_INIT;
6624
6624
                TIMELIB_DEINIT;
6625
6625
                return TIMELIB_PG_TEXT;
6626
6626
        }
6627
 
#line 6626 "ext/date/lib/parse_date.c"
 
6627
#line 6628 "ext/date/lib/parse_date.c"
6628
6628
yy365:
6629
6629
        YYDEBUG(365, *YYCURSOR);
6630
6630
        yych = *++YYCURSOR;
7262
7262
        }
7263
7263
yy393:
7264
7264
        YYDEBUG(393, *YYCURSOR);
7265
 
#line 1544 "ext/date/lib/parse_date.re"
 
7265
#line 1546 "ext/date/lib/parse_date.re"
7266
7266
        {
7267
7267
                DEBUG_OUTPUT("ago");
7268
7268
                TIMELIB_INIT;
7282
7282
                TIMELIB_DEINIT;
7283
7283
                return TIMELIB_AGO;
7284
7284
        }
7285
 
#line 7284 "ext/date/lib/parse_date.c"
 
7285
#line 7286 "ext/date/lib/parse_date.c"
7286
7286
yy394:
7287
7287
        YYDEBUG(394, *YYCURSOR);
7288
7288
        yyaccept = 5;
9032
9032
        ++YYCURSOR;
9033
9033
yy455:
9034
9034
        YYDEBUG(455, *YYCURSOR);
9035
 
#line 1258 "ext/date/lib/parse_date.re"
 
9035
#line 1260 "ext/date/lib/parse_date.re"
9036
9036
        {
9037
9037
                DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash");
9038
9038
                TIMELIB_INIT;
9043
9043
                TIMELIB_DEINIT;
9044
9044
                return TIMELIB_ISO_DATE;
9045
9045
        }
9046
 
#line 9045 "ext/date/lib/parse_date.c"
 
9046
#line 9047 "ext/date/lib/parse_date.c"
9047
9047
yy456:
9048
9048
        YYDEBUG(456, *YYCURSOR);
9049
9049
        yyaccept = 0;
9603
9603
        }
9604
9604
yy476:
9605
9605
        YYDEBUG(476, *YYCURSOR);
9606
 
#line 1387 "ext/date/lib/parse_date.re"
 
9606
#line 1389 "ext/date/lib/parse_date.re"
9607
9607
        {
9608
9608
                DEBUG_OUTPUT("datenoyearrev");
9609
9609
                TIMELIB_INIT;
9614
9614
                TIMELIB_DEINIT;
9615
9615
                return TIMELIB_DATE_TEXT;
9616
9616
        }
9617
 
#line 9616 "ext/date/lib/parse_date.c"
 
9617
#line 9618 "ext/date/lib/parse_date.c"
9618
9618
yy477:
9619
9619
        YYDEBUG(477, *YYCURSOR);
9620
9620
        yyaccept = 10;
9755
9755
        YYDEBUG(488, *YYCURSOR);
9756
9756
        ++YYCURSOR;
9757
9757
        YYDEBUG(489, *YYCURSOR);
9758
 
#line 1114 "ext/date/lib/parse_date.re"
 
9758
#line 1116 "ext/date/lib/parse_date.re"
9759
9759
        {
9760
9760
                DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12");
9761
9761
                TIMELIB_INIT;
9771
9771
                TIMELIB_DEINIT;
9772
9772
                return TIMELIB_TIME12;
9773
9773
        }
9774
 
#line 9773 "ext/date/lib/parse_date.c"
 
9774
#line 9775 "ext/date/lib/parse_date.c"
9775
9775
yy490:
9776
9776
        YYDEBUG(490, *YYCURSOR);
9777
9777
        yyaccept = 11;
9784
9784
        }
9785
9785
yy491:
9786
9786
        YYDEBUG(491, *YYCURSOR);
9787
 
#line 1151 "ext/date/lib/parse_date.re"
 
9787
#line 1153 "ext/date/lib/parse_date.re"
9788
9788
        {
9789
9789
                int tz_not_found;
9790
9790
                DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long");
9809
9809
                TIMELIB_DEINIT;
9810
9810
                return TIMELIB_TIME24_WITH_ZONE;
9811
9811
        }
9812
 
#line 9811 "ext/date/lib/parse_date.c"
 
9812
#line 9813 "ext/date/lib/parse_date.c"
9813
9813
yy492:
9814
9814
        YYDEBUG(492, *YYCURSOR);
9815
9815
        yyaccept = 11;
10119
10119
        YYDEBUG(523, *YYCURSOR);
10120
10120
        ++YYCURSOR;
10121
10121
        YYDEBUG(524, *YYCURSOR);
10122
 
#line 1131 "ext/date/lib/parse_date.re"
 
10122
#line 1133 "ext/date/lib/parse_date.re"
10123
10123
        {
10124
10124
                DEBUG_OUTPUT("mssqltime");
10125
10125
                TIMELIB_INIT;
10138
10138
                TIMELIB_DEINIT;
10139
10139
                return TIMELIB_TIME24_WITH_ZONE;
10140
10140
        }
10141
 
#line 10140 "ext/date/lib/parse_date.c"
 
10141
#line 10142 "ext/date/lib/parse_date.c"
10142
10142
yy525:
10143
10143
        YYDEBUG(525, *YYCURSOR);
10144
10144
        yyaccept = 11;
10244
10244
        if (yych <= '9') goto yy541;
10245
10245
yy535:
10246
10246
        YYDEBUG(535, *YYCURSOR);
10247
 
#line 1309 "ext/date/lib/parse_date.re"
 
10247
#line 1311 "ext/date/lib/parse_date.re"
10248
10248
        {
10249
10249
                DEBUG_OUTPUT("datefull");
10250
10250
                TIMELIB_INIT;
10257
10257
                TIMELIB_DEINIT;
10258
10258
                return TIMELIB_DATE_FULL;
10259
10259
        }
10260
 
#line 10259 "ext/date/lib/parse_date.c"
 
10260
#line 10261 "ext/date/lib/parse_date.c"
10261
10261
yy536:
10262
10262
        YYDEBUG(536, *YYCURSOR);
10263
10263
        yych = *++YYCURSOR;
10994
10994
        YYDEBUG(606, *YYCURSOR);
10995
10995
        ++YYCURSOR;
10996
10996
        YYDEBUG(607, *YYCURSOR);
10997
 
#line 1323 "ext/date/lib/parse_date.re"
 
10997
#line 1325 "ext/date/lib/parse_date.re"
10998
10998
        {
10999
10999
                DEBUG_OUTPUT("pointed date YYYY");
11000
11000
                TIMELIB_INIT;
11005
11005
                TIMELIB_DEINIT;
11006
11006
                return TIMELIB_DATE_FULL_POINTED;
11007
11007
        }
11008
 
#line 11007 "ext/date/lib/parse_date.c"
 
11008
#line 11009 "ext/date/lib/parse_date.c"
11009
11009
yy608:
11010
11010
        YYDEBUG(608, *YYCURSOR);
11011
11011
        yyaccept = 11;
11041
11041
        if (yych <= '9') goto yy605;
11042
11042
yy612:
11043
11043
        YYDEBUG(612, *YYCURSOR);
11044
 
#line 1335 "ext/date/lib/parse_date.re"
 
11044
#line 1337 "ext/date/lib/parse_date.re"
11045
11045
        {
11046
11046
                DEBUG_OUTPUT("pointed date YY");
11047
11047
                TIMELIB_INIT;
11053
11053
                TIMELIB_DEINIT;
11054
11054
                return TIMELIB_DATE_FULL_POINTED;
11055
11055
        }
11056
 
#line 11055 "ext/date/lib/parse_date.c"
 
11056
#line 11057 "ext/date/lib/parse_date.c"
11057
11057
yy613:
11058
11058
        YYDEBUG(613, *YYCURSOR);
11059
11059
        yyaccept = 11;
11694
11694
        }
11695
11695
yy657:
11696
11696
        YYDEBUG(657, *YYCURSOR);
11697
 
#line 1296 "ext/date/lib/parse_date.re"
 
11697
#line 1298 "ext/date/lib/parse_date.re"
11698
11698
        {
11699
11699
                DEBUG_OUTPUT("gnudateshort");
11700
11700
                TIMELIB_INIT;
11706
11706
                TIMELIB_DEINIT;
11707
11707
                return TIMELIB_ISO_DATE;
11708
11708
        }
11709
 
#line 11708 "ext/date/lib/parse_date.c"
 
11709
#line 11710 "ext/date/lib/parse_date.c"
11710
11710
yy658:
11711
11711
        YYDEBUG(658, *YYCURSOR);
11712
11712
        yyaccept = 13;
11812
11812
        }
11813
11813
yy667:
11814
11814
        YYDEBUG(667, *YYCURSOR);
11815
 
#line 1243 "ext/date/lib/parse_date.re"
 
11815
#line 1245 "ext/date/lib/parse_date.re"
11816
11816
        {
11817
11817
                DEBUG_OUTPUT("americanshort | american");
11818
11818
                TIMELIB_INIT;
11826
11826
                TIMELIB_DEINIT;
11827
11827
                return TIMELIB_AMERICAN;
11828
11828
        }
11829
 
#line 11828 "ext/date/lib/parse_date.c"
 
11829
#line 11830 "ext/date/lib/parse_date.c"
11830
11830
yy668:
11831
11831
        YYDEBUG(668, *YYCURSOR);
11832
11832
        yyaccept = 14;
12059
12059
        if (yych <= ':') goto yy704;
12060
12060
yy701:
12061
12061
        YYDEBUG(701, *YYCURSOR);
12062
 
#line 1514 "ext/date/lib/parse_date.re"
 
12062
#line 1516 "ext/date/lib/parse_date.re"
12063
12063
        {
12064
12064
                int tz_not_found;
12065
12065
                DEBUG_OUTPUT("clf");
12079
12079
                TIMELIB_DEINIT;
12080
12080
                return TIMELIB_CLF;
12081
12081
        }
12082
 
#line 12081 "ext/date/lib/parse_date.c"
 
12082
#line 12083 "ext/date/lib/parse_date.c"
12083
12083
yy702:
12084
12084
        YYDEBUG(702, *YYCURSOR);
12085
12085
        yych = *++YYCURSOR;
12631
12631
        }
12632
12632
yy764:
12633
12633
        YYDEBUG(764, *YYCURSOR);
12634
 
#line 1270 "ext/date/lib/parse_date.re"
 
12634
#line 1272 "ext/date/lib/parse_date.re"
12635
12635
        {
12636
12636
                DEBUG_OUTPUT("iso8601date2");
12637
12637
                TIMELIB_INIT;
12643
12643
                TIMELIB_DEINIT;
12644
12644
                return TIMELIB_ISO_DATE;
12645
12645
        }
12646
 
#line 12645 "ext/date/lib/parse_date.c"
 
12646
#line 12647 "ext/date/lib/parse_date.c"
12647
12647
yy765:
12648
12648
        YYDEBUG(765, *YYCURSOR);
12649
12649
        yych = *++YYCURSOR;
12682
12682
        YYDEBUG(771, *YYCURSOR);
12683
12683
        ++YYCURSOR;
12684
12684
        YYDEBUG(772, *YYCURSOR);
12685
 
#line 1501 "ext/date/lib/parse_date.re"
 
12685
#line 1503 "ext/date/lib/parse_date.re"
12686
12686
        {
12687
12687
                DEBUG_OUTPUT("pgtextreverse");
12688
12688
                TIMELIB_INIT;
12694
12694
                TIMELIB_DEINIT;
12695
12695
                return TIMELIB_PG_TEXT;
12696
12696
        }
12697
 
#line 12696 "ext/date/lib/parse_date.c"
 
12697
#line 12698 "ext/date/lib/parse_date.c"
12698
12698
yy773:
12699
12699
        YYDEBUG(773, *YYCURSOR);
12700
12700
        yych = *++YYCURSOR;
12832
12832
        }
12833
12833
yy784:
12834
12834
        YYDEBUG(784, *YYCURSOR);
12835
 
#line 1535 "ext/date/lib/parse_date.re"
 
12835
#line 1537 "ext/date/lib/parse_date.re"
12836
12836
        {
12837
12837
                DEBUG_OUTPUT("year4");
12838
12838
                TIMELIB_INIT;
12840
12840
                TIMELIB_DEINIT;
12841
12841
                return TIMELIB_CLF;
12842
12842
        }
12843
 
#line 12842 "ext/date/lib/parse_date.c"
 
12843
#line 12844 "ext/date/lib/parse_date.c"
12844
12844
yy785:
12845
12845
        YYDEBUG(785, *YYCURSOR);
12846
12846
        yych = *++YYCURSOR;
12991
12991
        }
12992
12992
yy794:
12993
12993
        YYDEBUG(794, *YYCURSOR);
12994
 
#line 1361 "ext/date/lib/parse_date.re"
 
12994
#line 1363 "ext/date/lib/parse_date.re"
12995
12995
        {
12996
12996
                DEBUG_OUTPUT("datenodayrev");
12997
12997
                TIMELIB_INIT;
13003
13003
                TIMELIB_DEINIT;
13004
13004
                return TIMELIB_DATE_NO_DAY;
13005
13005
        }
13006
 
#line 13005 "ext/date/lib/parse_date.c"
 
13006
#line 13007 "ext/date/lib/parse_date.c"
13007
13007
yy795:
13008
13008
        YYDEBUG(795, *YYCURSOR);
13009
13009
        yych = *++YYCURSOR;
13218
13218
        if (yych <= '7') goto yy817;
13219
13219
yy815:
13220
13220
        YYDEBUG(815, *YYCURSOR);
13221
 
#line 1469 "ext/date/lib/parse_date.re"
 
13221
#line 1471 "ext/date/lib/parse_date.re"
13222
13222
        {
13223
13223
                timelib_sll w, d;
13224
13224
                DEBUG_OUTPUT("isoweek");
13236
13236
                TIMELIB_DEINIT;
13237
13237
                return TIMELIB_ISO_WEEK;
13238
13238
        }
13239
 
#line 13238 "ext/date/lib/parse_date.c"
 
13239
#line 13240 "ext/date/lib/parse_date.c"
13240
13240
yy816:
13241
13241
        YYDEBUG(816, *YYCURSOR);
13242
13242
        yych = *++YYCURSOR;
13246
13246
        YYDEBUG(817, *YYCURSOR);
13247
13247
        ++YYCURSOR;
13248
13248
        YYDEBUG(818, *YYCURSOR);
13249
 
#line 1450 "ext/date/lib/parse_date.re"
 
13249
#line 1452 "ext/date/lib/parse_date.re"
13250
13250
        {
13251
13251
                timelib_sll w, d;
13252
13252
                DEBUG_OUTPUT("isoweekday");
13264
13264
                TIMELIB_DEINIT;
13265
13265
                return TIMELIB_ISO_WEEK;
13266
13266
        }
13267
 
#line 13266 "ext/date/lib/parse_date.c"
 
13267
#line 13268 "ext/date/lib/parse_date.c"
13268
13268
yy819:
13269
13269
        YYDEBUG(819, *YYCURSOR);
13270
13270
        yych = *++YYCURSOR;
13328
13328
        }
13329
13329
yy822:
13330
13330
        YYDEBUG(822, *YYCURSOR);
13331
 
#line 1437 "ext/date/lib/parse_date.re"
 
13331
#line 1439 "ext/date/lib/parse_date.re"
13332
13332
        {
13333
13333
                DEBUG_OUTPUT("pgydotd");
13334
13334
                TIMELIB_INIT;
13340
13340
                TIMELIB_DEINIT;
13341
13341
                return TIMELIB_PG_YEARDAY;
13342
13342
        }
13343
 
#line 13342 "ext/date/lib/parse_date.c"
 
13343
#line 13344 "ext/date/lib/parse_date.c"
13344
13344
yy823:
13345
13345
        YYDEBUG(823, *YYCURSOR);
13346
13346
        yych = *++YYCURSOR;
13443
13443
        ++YYCURSOR;
13444
13444
yy843:
13445
13445
        YYDEBUG(843, *YYCURSOR);
13446
 
#line 1411 "ext/date/lib/parse_date.re"
 
13446
#line 1413 "ext/date/lib/parse_date.re"
13447
13447
        {
13448
13448
                int tz_not_found;
13449
13449
                DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif");
13468
13468
                TIMELIB_DEINIT;
13469
13469
                return TIMELIB_XMLRPC_SOAP;
13470
13470
        }
13471
 
#line 13470 "ext/date/lib/parse_date.c"
 
13471
#line 13472 "ext/date/lib/parse_date.c"
13472
13472
yy844:
13473
13473
        YYDEBUG(844, *YYCURSOR);
13474
13474
        yych = *++YYCURSOR;
13730
13730
        }
13731
13731
yy849:
13732
13732
        YYDEBUG(849, *YYCURSOR);
13733
 
#line 1399 "ext/date/lib/parse_date.re"
 
13733
#line 1401 "ext/date/lib/parse_date.re"
13734
13734
        {
13735
13735
                DEBUG_OUTPUT("datenocolon");
13736
13736
                TIMELIB_INIT;
13741
13741
                TIMELIB_DEINIT;
13742
13742
                return TIMELIB_DATE_NOCOLON;
13743
13743
        }
13744
 
#line 13743 "ext/date/lib/parse_date.c"
 
13744
#line 13745 "ext/date/lib/parse_date.c"
13745
13745
yy850:
13746
13746
        YYDEBUG(850, *YYCURSOR);
13747
13747
        yych = *++YYCURSOR;
14661
14661
        if (yych <= '9') goto yy996;
14662
14662
yy974:
14663
14663
        YYDEBUG(974, *YYCURSOR);
14664
 
#line 1283 "ext/date/lib/parse_date.re"
 
14664
#line 1285 "ext/date/lib/parse_date.re"
14665
14665
        {
14666
14666
                DEBUG_OUTPUT("gnudateshorter");
14667
14667
                TIMELIB_INIT;
14673
14673
                TIMELIB_DEINIT;
14674
14674
                return TIMELIB_ISO_DATE;
14675
14675
        }
14676
 
#line 14675 "ext/date/lib/parse_date.c"
 
14676
#line 14677 "ext/date/lib/parse_date.c"
14677
14677
yy975:
14678
14678
        YYDEBUG(975, *YYCURSOR);
14679
14679
        yyaccept = 22;
15682
15682
        }
15683
15683
yy1068:
15684
15684
        YYDEBUG(1068, *YYCURSOR);
15685
 
#line 1177 "ext/date/lib/parse_date.re"
 
15685
#line 1179 "ext/date/lib/parse_date.re"
15686
15686
        {
15687
15687
                DEBUG_OUTPUT("gnunocolon");
15688
15688
                TIMELIB_INIT;
15704
15704
                TIMELIB_DEINIT;
15705
15705
                return TIMELIB_GNU_NOCOLON;
15706
15706
        }
15707
 
#line 15706 "ext/date/lib/parse_date.c"
 
15707
#line 15708 "ext/date/lib/parse_date.c"
15708
15708
yy1069:
15709
15709
        YYDEBUG(1069, *YYCURSOR);
15710
15710
        yych = *++YYCURSOR;
15796
15796
        }
15797
15797
yy1076:
15798
15798
        YYDEBUG(1076, *YYCURSOR);
15799
 
#line 1223 "ext/date/lib/parse_date.re"
 
15799
#line 1225 "ext/date/lib/parse_date.re"
15800
15800
        {
15801
15801
                int tz_not_found;
15802
15802
                DEBUG_OUTPUT("iso8601nocolon");
15815
15815
                TIMELIB_DEINIT;
15816
15816
                return TIMELIB_ISO_NOCOLON;
15817
15817
        }
15818
 
#line 15817 "ext/date/lib/parse_date.c"
 
15818
#line 15819 "ext/date/lib/parse_date.c"
15819
15819
yy1077:
15820
15820
        YYDEBUG(1077, *YYCURSOR);
15821
15821
        yyaccept = 25;
16713
16713
        }
16714
16714
yy1118:
16715
16715
        YYDEBUG(1118, *YYCURSOR);
16716
 
#line 1607 "ext/date/lib/parse_date.re"
 
16716
#line 1609 "ext/date/lib/parse_date.re"
16717
16717
        {
16718
16718
                timelib_sll i;
16719
16719
                int         behavior = 0;
16729
16729
                TIMELIB_DEINIT;
16730
16730
                return TIMELIB_RELATIVE;
16731
16731
        }
16732
 
#line 16731 "ext/date/lib/parse_date.c"
 
16732
#line 16733 "ext/date/lib/parse_date.c"
16733
16733
yy1119:
16734
16734
        YYDEBUG(1119, *YYCURSOR);
16735
16735
        ++YYCURSOR;
16780
16780
        YYDEBUG(1126, *YYCURSOR);
16781
16781
        ++YYCURSOR;
16782
16782
        YYDEBUG(1127, *YYCURSOR);
16783
 
#line 1092 "ext/date/lib/parse_date.re"
 
16783
#line 1094 "ext/date/lib/parse_date.re"
16784
16784
        {
16785
16785
                timelib_sll i;
16786
16786
                int         behavior = 0;
16801
16801
                TIMELIB_DEINIT;
16802
16802
                return TIMELIB_WEEK_DAY_OF_MONTH;
16803
16803
        }
16804
 
#line 16803 "ext/date/lib/parse_date.c"
 
16804
#line 16805 "ext/date/lib/parse_date.c"
16805
16805
yy1128:
16806
16806
        YYDEBUG(1128, *YYCURSOR);
16807
16807
        yyaccept = 26;
16909
16909
        }
16910
16910
yy1142:
16911
16911
        YYDEBUG(1142, *YYCURSOR);
16912
 
#line 1583 "ext/date/lib/parse_date.re"
 
16912
#line 1585 "ext/date/lib/parse_date.re"
16913
16913
        {
16914
16914
                timelib_sll i;
16915
16915
                int         behavior = 0;
16932
16932
                TIMELIB_DEINIT;
16933
16933
                return TIMELIB_RELATIVE;
16934
16934
        }
16935
 
#line 16934 "ext/date/lib/parse_date.c"
 
16935
#line 16936 "ext/date/lib/parse_date.c"
16936
16936
yy1143:
16937
16937
        YYDEBUG(1143, *YYCURSOR);
16938
16938
        yych = *++YYCURSOR;
19609
19609
        goto yy1298;
19610
19610
yy1295:
19611
19611
        YYDEBUG(1295, *YYCURSOR);
19612
 
#line 1069 "ext/date/lib/parse_date.re"
 
19612
#line 1071 "ext/date/lib/parse_date.re"
19613
19613
        {
19614
19614
                DEBUG_OUTPUT("backof | frontof");
19615
19615
                TIMELIB_INIT;
19631
19631
                TIMELIB_DEINIT;
19632
19632
                return TIMELIB_LF_DAY_OF_MONTH;
19633
19633
        }
19634
 
#line 19633 "ext/date/lib/parse_date.c"
 
19634
#line 19635 "ext/date/lib/parse_date.c"
19635
19635
yy1296:
19636
19636
        YYDEBUG(1296, *YYCURSOR);
19637
19637
        yyaccept = 28;
21322
21322
        if (yych <= '9') goto yy1385;
21323
21323
yy1387:
21324
21324
        YYDEBUG(1387, *YYCURSOR);
21325
 
#line 1027 "ext/date/lib/parse_date.re"
 
21325
#line 1029 "ext/date/lib/parse_date.re"
21326
21326
        {
21327
21327
                timelib_ull i;
21328
21328
 
21346
21346
                TIMELIB_DEINIT;
21347
21347
                return TIMELIB_RELATIVE;
21348
21348
        }
21349
 
#line 21348 "ext/date/lib/parse_date.c"
 
21349
#line 21350 "ext/date/lib/parse_date.c"
21350
21350
yy1388:
21351
21351
        YYDEBUG(1388, *YYCURSOR);
21352
21352
        yych = *++YYCURSOR;
21782
21782
        ++YYCURSOR;
21783
21783
yy1417:
21784
21784
        YYDEBUG(1417, *YYCURSOR);
21785
 
#line 1015 "ext/date/lib/parse_date.re"
 
21785
#line 1017 "ext/date/lib/parse_date.re"
21786
21786
        {
21787
21787
                DEBUG_OUTPUT("tomorrow");
21788
21788
                TIMELIB_INIT;
21793
21793
                TIMELIB_DEINIT;
21794
21794
                return TIMELIB_RELATIVE;
21795
21795
        }
21796
 
#line 21795 "ext/date/lib/parse_date.c"
 
21796
#line 21797 "ext/date/lib/parse_date.c"
21797
21797
yy1418:
21798
21798
        YYDEBUG(1418, *YYCURSOR);
21799
21799
        yych = *++YYCURSOR;
21828
21828
        }
21829
21829
yy1420:
21830
21830
        YYDEBUG(1420, *YYCURSOR);
21831
 
#line 1005 "ext/date/lib/parse_date.re"
 
21831
#line 1007 "ext/date/lib/parse_date.re"
21832
21832
        {
21833
21833
                DEBUG_OUTPUT("midnight | today");
21834
21834
                TIMELIB_INIT;
21837
21837
                TIMELIB_DEINIT;
21838
21838
                return TIMELIB_RELATIVE;
21839
21839
        }
21840
 
#line 21839 "ext/date/lib/parse_date.c"
 
21840
#line 21841 "ext/date/lib/parse_date.c"
21841
21841
yy1421:
21842
21842
        YYDEBUG(1421, *YYCURSOR);
21843
21843
        yych = *++YYCURSOR;
23849
23849
        }
23850
23850
yy1500:
23851
23851
        YYDEBUG(1500, *YYCURSOR);
23852
 
#line 984 "ext/date/lib/parse_date.re"
 
23852
#line 986 "ext/date/lib/parse_date.re"
23853
23853
        {
23854
23854
                DEBUG_OUTPUT("now");
23855
23855
                TIMELIB_INIT;
23857
23857
                TIMELIB_DEINIT;
23858
23858
                return TIMELIB_RELATIVE;
23859
23859
        }
23860
 
#line 23859 "ext/date/lib/parse_date.c"
 
23860
#line 23861 "ext/date/lib/parse_date.c"
23861
23861
yy1501:
23862
23862
        YYDEBUG(1501, *YYCURSOR);
23863
23863
        yych = *++YYCURSOR;
23996
23996
        }
23997
23997
yy1508:
23998
23998
        YYDEBUG(1508, *YYCURSOR);
23999
 
#line 993 "ext/date/lib/parse_date.re"
 
23999
#line 995 "ext/date/lib/parse_date.re"
24000
24000
        {
24001
24001
                DEBUG_OUTPUT("noon");
24002
24002
                TIMELIB_INIT;
24007
24007
                TIMELIB_DEINIT;
24008
24008
                return TIMELIB_RELATIVE;
24009
24009
        }
24010
 
#line 24009 "ext/date/lib/parse_date.c"
 
24010
#line 24011 "ext/date/lib/parse_date.c"
24011
24011
yy1509:
24012
24012
        YYDEBUG(1509, *YYCURSOR);
24013
24013
        yyaccept = 0;
24540
24540
        ++YYCURSOR;
24541
24541
yy1531:
24542
24542
        YYDEBUG(1531, *YYCURSOR);
24543
 
#line 972 "ext/date/lib/parse_date.re"
 
24543
#line 974 "ext/date/lib/parse_date.re"
24544
24544
        {
24545
24545
                DEBUG_OUTPUT("yesterday");
24546
24546
                TIMELIB_INIT;
24551
24551
                TIMELIB_DEINIT;
24552
24552
                return TIMELIB_RELATIVE;
24553
24553
        }
24554
 
#line 24553 "ext/date/lib/parse_date.c"
 
24554
#line 24555 "ext/date/lib/parse_date.c"
24555
24555
yy1532:
24556
24556
        YYDEBUG(1532, *YYCURSOR);
24557
24557
        yyaccept = 0;
24724
24724
                goto yy1531;
24725
24725
        }
24726
24726
}
24727
 
#line 1733 "ext/date/lib/parse_date.re"
 
24727
#line 1735 "ext/date/lib/parse_date.re"
24728
24728
 
24729
24729
}
24730
24730
 
24791
24791
#endif
24792
24792
        } while(t != EOI);
24793
24793
 
 
24794
        /* do funky checking whether the parsed time was valid time */
 
24795
        if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) {
 
24796
                add_warning(&in, "The parsed time was invalid");
 
24797
        }
24794
24798
        /* do funky checking whether the parsed date was valid date */
24795
24799
        if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) {
24796
24800
                add_warning(&in, "The parsed date was invalid");
24986
24990
                                break;
24987
24991
 
24988
24992
                        case '#': /* separation symbol */
24989
 
                                if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-') {
 
24993
                                if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') {
24990
24994
                                        ++ptr;
24991
24995
                                } else {
24992
24996
                                        add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin);
24999
25003
                        case '.':
25000
25004
                        case ',':
25001
25005
                        case '-':
 
25006
                        case '(':
 
25007
                        case ')':
25002
25008
                                if (*ptr == *fptr) {
25003
25009
                                        ++ptr;
25004
25010
                                } else {