36 #define yylex KHolidayslex
38 #include "holidayparserplan.hpp"
41 #line 108 "holidayparserplan.ypp"
44 #include "holidayparserdriverplan_p.h"
45 #include "holidayscannerplan_p.h"
51 #define yylex driver.m_scanner->lex
56 #line 57 "holidayparserplan.cpp"
62 # define YY_(msgid) dgettext ("bison-runtime", msgid)
66 # define YY_(msgid) msgid
71 #define YYUSE(e) ((void) (e))
75 for (bool yydebugcond_ = yydebug_; yydebugcond_; yydebugcond_ = false) \
81 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
85 *yycdebug_ << Title << ' '; \
86 yy_symbol_print_ ((Type), (Value), (Location)); \
87 *yycdebug_ << std::endl; \
91 # define YY_REDUCE_PRINT(Rule) \
94 yy_reduce_print_ (Rule); \
97 # define YY_STACK_PRINT() \
105 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
106 # define YY_REDUCE_PRINT(Rule)
107 # define YY_STACK_PRINT()
111 #define YYACCEPT goto yyacceptlab
112 #define YYABORT goto yyabortlab
113 #define YYERROR goto yyerrorlab
125 HolidayParserPlan::yytnamerr_ (
const char *yystr)
129 std::string yyr =
"";
130 char const *yyp = yystr;
137 goto do_not_strip_quotes;
141 goto do_not_strip_quotes;
150 do_not_strip_quotes: ;
161 yycdebug_ (&std::cerr),
162 driver (driver_yyarg)
166 HolidayParserPlan::~HolidayParserPlan ()
176 HolidayParserPlan::yy_symbol_value_print_ (
int yytype,
177 const semantic_type* yyvaluep,
const location_type* yylocationp)
190 HolidayParserPlan::yy_symbol_print_ (
int yytype,
191 const semantic_type* yyvaluep,
const location_type* yylocationp)
193 *yycdebug_ << (yytype < yyntokens_ ?
"token" :
"nterm")
194 <<
' ' << yytname_[yytype] <<
" ("
195 << *yylocationp <<
": ";
196 yy_symbol_value_print_ (yytype, yyvaluep, yylocationp);
202 HolidayParserPlan::yydestruct_ (
const char* yymsg,
203 int yytype, semantic_type* yyvaluep, location_type* yylocationp)
209 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
220 HolidayParserPlan::yypop_ (
unsigned int n)
222 yystate_stack_.pop (n);
223 yysemantic_stack_.pop (n);
224 yylocation_stack_.pop (n);
257 int yychar = yyempty_;
267 int yyerrstatus_ = 0;
283 YYCDEBUG <<
"Starting parse" << std::endl;
287 #line 70 "holidayparserplan.ypp"
290 yylloc.
begin.
filename =
new std::string( driver.filePath().toLocal8Bit().data() );
294 #line 295 "holidayparserplan.cpp"
299 yystate_stack_ = state_stack_type (0);
300 yysemantic_stack_ = semantic_stack_type (0);
301 yylocation_stack_ = location_stack_type (0);
302 yysemantic_stack_.push (yylval);
303 yylocation_stack_.push (yylloc);
307 yystate_stack_.push (yystate);
308 YYCDEBUG <<
"Entering state " << yystate << std::endl;
315 yyn = yypact_[yystate];
316 if (yyn == yypact_ninf_)
320 if (yychar == yyempty_)
322 YYCDEBUG <<
"Reading a token: ";
323 yychar = yylex (&yylval, &yylloc);
328 if (yychar <= yyeof_)
330 yychar = yytoken = yyeof_;
331 YYCDEBUG <<
"Now at end of input." << std::endl;
335 yytoken = yytranslate_ (yychar);
336 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
342 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
349 if (yyn == 0 || yyn == yytable_ninf_)
360 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
363 if (yychar != yyeof_)
366 yysemantic_stack_.push (yylval);
367 yylocation_stack_.push (yylloc);
381 yyn = yydefact_[yystate];
398 yyval = yysemantic_stack_[yylen - 1];
400 yyval = yysemantic_stack_[0];
404 YYLLOC_DEFAULT (yyloc, slice, yylen);
406 YY_REDUCE_PRINT (yyn);
410 #line 129 "holidayparserplan.ypp"
411 { driver.setFileCountryCode( QString() ); ;}
415 #line 130 "holidayparserplan.ypp"
416 { driver.setFileCountryCode( QString::fromUtf8( (yysemantic_stack_[(2) - (2)].sval) ) ); ;}
420 #line 133 "holidayparserplan.ypp"
421 { driver.setFileLanguageCode( QString() ); ;}
425 #line 134 "holidayparserplan.ypp"
426 { driver.setFileLanguageCode( QString::fromUtf8( (yysemantic_stack_[(2) - (2)].sval) ) ); ;}
430 #line 137 "holidayparserplan.ypp"
431 { driver.setFileName( QString() ); ;}
435 #line 138 "holidayparserplan.ypp"
436 { driver.setFileName( QString::fromUtf8( (yysemantic_stack_[(2) - (2)].sval) ) ); ;}
440 #line 141 "holidayparserplan.ypp"
441 { driver.setFileDescription( QString() ); ;}
445 #line 142 "holidayparserplan.ypp"
446 { driver.setFileDescription( QString::fromUtf8( (yysemantic_stack_[(2) - (2)].sval) ) ); ;}
450 #line 153 "holidayparserplan.ypp"
451 { driver.setEventColorName( 0 ); ;}
455 #line 154 "holidayparserplan.ypp"
456 { driver.setEventColorName( (yysemantic_stack_[(1) - (1)].ival) ); ;}
460 #line 157 "holidayparserplan.ypp"
461 { driver.setEventColorDay( 0 ); ;}
465 #line 158 "holidayparserplan.ypp"
466 { driver.setEventColorDay( (yysemantic_stack_[(1) - (1)].ival) ); ;}
470 #line 161 "holidayparserplan.ypp"
471 { driver.setEventName( QString::fromUtf8( (yysemantic_stack_[(1) - (1)].sval) ) ); ;}
475 #line 164 "holidayparserplan.ypp"
476 { driver.setEventCalendarType(
"gregorian" ); ;}
480 #line 165 "holidayparserplan.ypp"
481 { driver.setEventCalendarType( QString::fromUtf8( (yysemantic_stack_[(1) - (1)].sval) ) ); ;}
485 #line 168 "holidayparserplan.ypp"
486 { driver.setFromEaster( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
490 #line 169 "holidayparserplan.ypp"
491 { driver.setFromPascha( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
495 #line 170 "holidayparserplan.ypp"
496 { driver.setFromDate( (yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
500 #line 171 "holidayparserplan.ypp"
501 { driver.setFromWeekdayInMonth( 1, (yysemantic_stack_[(3) - (1)].ival), 1, (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
505 #line 172 "holidayparserplan.ypp"
506 { driver.setFromWeekdayInMonth( (yysemantic_stack_[(4) - (1)].ival), (yysemantic_stack_[(4) - (2)].ival), 1, (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
510 #line 173 "holidayparserplan.ypp"
511 { driver.setFromWeekdayInMonth( (yysemantic_stack_[(6) - (1)].ival), (yysemantic_stack_[(6) - (2)].ival), (yysemantic_stack_[(6) - (4)].ival), (yysemantic_stack_[(6) - (5)].ival), (yysemantic_stack_[(6) - (6)].ival) ); ;}
515 #line 174 "holidayparserplan.ypp"
516 { driver.setFromRelativeWeekday( (yysemantic_stack_[(5) - (2)].ival), (yysemantic_stack_[(5) - (1)].ival), (yysemantic_stack_[(5) - (4)].ival), (yysemantic_stack_[(5) - (5)].ival) ); ;}
520 #line 177 "holidayparserplan.ypp"
521 { (yyval.ival) = 0; ;}
525 #line 178 "holidayparserplan.ypp"
526 { (yyval.ival) = (yysemantic_stack_[(2) - (2)].ival); ;}
530 #line 179 "holidayparserplan.ypp"
531 { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); ;}
535 #line 182 "holidayparserplan.ypp"
536 { (yyval.ival) = 0; ;}
540 #line 183 "holidayparserplan.ypp"
541 { (yyval.ival) = ( (yysemantic_stack_[(4) - (2)].ival) << 8 ) | (yysemantic_stack_[(4) - (4)].ival); ;}
545 #line 186 "holidayparserplan.ypp"
546 { (yyval.ival) = 0; ;}
550 #line 187 "holidayparserplan.ypp"
551 { (yyval.ival) = ( 1 << (yysemantic_stack_[(1) - (1)].ival) ); ;}
555 #line 188 "holidayparserplan.ypp"
556 { (yyval.ival) = ( 1 << (yysemantic_stack_[(3) - (1)].ival) ) | (yysemantic_stack_[(3) - (3)].ival); ;}
560 #line 191 "holidayparserplan.ypp"
561 { (yyval.ival) = 1; ;}
565 #line 192 "holidayparserplan.ypp"
566 { (yyval.ival) = (yysemantic_stack_[(2) - (2)].ival); ;}
570 #line 195 "holidayparserplan.ypp"
571 { driver.setEventDate( -99999, (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
575 #line 196 "holidayparserplan.ypp"
576 { driver.setEventDate( -99999, (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
580 #line 197 "holidayparserplan.ypp"
581 { driver.setEventDate( (yysemantic_stack_[(5) - (5)].ival), (yysemantic_stack_[(5) - (3)].ival), (yysemantic_stack_[(5) - (1)].ival) ); ;}
585 #line 198 "holidayparserplan.ypp"
586 { driver.setEventDate( -99999, (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
590 #line 199 "holidayparserplan.ypp"
591 { driver.setEventDate( (yysemantic_stack_[(5) - (5)].ival), (yysemantic_stack_[(5) - (1)].ival), (yysemantic_stack_[(5) - (3)].ival) ); ;}
595 #line 200 "holidayparserplan.ypp"
596 { driver.setEventDate( -99999, (yysemantic_stack_[(2) - (1)].ival), (yysemantic_stack_[(2) - (2)].ival) ); ;}
600 #line 201 "holidayparserplan.ypp"
601 { driver.setEventDate( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (2)].ival) ); ;}
605 #line 202 "holidayparserplan.ypp"
606 { driver.setEventDate( -99999, (yysemantic_stack_[(2) - (2)].ival), (yysemantic_stack_[(2) - (1)].ival) ); ;}
610 #line 203 "holidayparserplan.ypp"
611 { driver.setEventDate( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
615 #line 204 "holidayparserplan.ypp"
616 { driver.setEventDate( (yysemantic_stack_[(4) - (4)].ival), (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
620 #line 205 "holidayparserplan.ypp"
621 { driver.setEventDate( (yysemantic_stack_[(1) - (1)].ival) ); ;}
625 #line 208 "holidayparserplan.ypp"
626 { (yyval.ival) = driver.julianDayFromEventName( (yysemantic_stack_[(1) - (1)].sval) ); ;}
630 #line 209 "holidayparserplan.ypp"
631 { (yyval.ival) = driver.julianDayFromEaster(); ;}
635 #line 210 "holidayparserplan.ypp"
636 { (yyval.ival) = driver.julianDayFromPascha(); ;}
640 #line 211 "holidayparserplan.ypp"
641 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
645 #line 212 "holidayparserplan.ypp"
646 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
650 #line 213 "holidayparserplan.ypp"
651 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
655 #line 214 "holidayparserplan.ypp"
656 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(2) - (2)].ival), (yysemantic_stack_[(2) - (1)].ival) ); ;}
660 #line 215 "holidayparserplan.ypp"
661 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(2) - (1)].ival), (yysemantic_stack_[(2) - (2)].ival) ); ;}
665 #line 216 "holidayparserplan.ypp"
666 { (yyval.ival) = driver.julianDayFromRelativeWeekday( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
670 #line 217 "holidayparserplan.ypp"
671 { (yyval.ival) = driver.julianDayFromWeekdayInMonth( (yysemantic_stack_[(4) - (1)].ival), (yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
675 #line 221 "holidayparserplan.ypp"
676 { (yyval.ival) = driver.adjustedMonthNumber( (yysemantic_stack_[(1) - (1)].ival) ); ;}
680 #line 224 "holidayparserplan.ypp"
681 { (yyval.ival) = driver.adjustedMonthNumber( (yysemantic_stack_[(1) - (1)].ival) ); ;}
685 #line 227 "holidayparserplan.ypp"
686 { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); ;}
690 #line 228 "holidayparserplan.ypp"
691 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) || (yysemantic_stack_[(3) - (3)].ival); ;}
695 #line 229 "holidayparserplan.ypp"
696 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) && (yysemantic_stack_[(3) - (3)].ival); ;}
700 #line 230 "holidayparserplan.ypp"
701 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) == (yysemantic_stack_[(3) - (3)].ival); ;}
705 #line 231 "holidayparserplan.ypp"
706 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) != (yysemantic_stack_[(3) - (3)].ival); ;}
710 #line 232 "holidayparserplan.ypp"
711 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) <= (yysemantic_stack_[(3) - (3)].ival); ;}
715 #line 233 "holidayparserplan.ypp"
716 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) >= (yysemantic_stack_[(3) - (3)].ival); ;}
720 #line 234 "holidayparserplan.ypp"
721 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) < (yysemantic_stack_[(3) - (3)].ival); ;}
725 #line 235 "holidayparserplan.ypp"
726 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) > (yysemantic_stack_[(3) - (3)].ival); ;}
730 #line 236 "holidayparserplan.ypp"
731 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) + (yysemantic_stack_[(3) - (3)].ival); ;}
735 #line 237 "holidayparserplan.ypp"
736 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) - (yysemantic_stack_[(3) - (3)].ival); ;}
740 #line 238 "holidayparserplan.ypp"
741 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) * (yysemantic_stack_[(3) - (3)].ival); ;}
745 #line 239 "holidayparserplan.ypp"
746 { (yyval.ival) = (yysemantic_stack_[(3) - (3)].ival) ? (yysemantic_stack_[(3) - (1)].ival) / (yysemantic_stack_[(3) - (3)].ival) : 0; ;}
750 #line 240 "holidayparserplan.ypp"
751 { (yyval.ival) = (yysemantic_stack_[(3) - (3)].ival) ? (yysemantic_stack_[(3) - (1)].ival) % (yysemantic_stack_[(3) - (3)].ival) : 0; ;}
755 #line 241 "holidayparserplan.ypp"
756 { (yyval.ival) = (yysemantic_stack_[(5) - (1)].ival) ? (yysemantic_stack_[(5) - (3)].ival) : (yysemantic_stack_[(5) - (5)].ival); ;}
760 #line 242 "holidayparserplan.ypp"
761 { (yyval.ival) = !(yysemantic_stack_[(2) - (2)].ival); ;}
765 #line 243 "holidayparserplan.ypp"
766 { (yyval.ival) = (yysemantic_stack_[(3) - (2)].ival); ;}
770 #line 246 "holidayparserplan.ypp"
771 { (yyval.ival) = (yysemantic_stack_[(3) - (2)].ival); ;}
775 #line 247 "holidayparserplan.ypp"
776 { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); ;}
780 #line 251 "holidayparserplan.ypp"
781 { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); ;}
785 #line 252 "holidayparserplan.ypp"
786 { (yyval.ival) = driver.parseYear(); ;}
790 #line 253 "holidayparserplan.ypp"
791 { (yyval.ival) = driver.isLeapYear( (yysemantic_stack_[(2) - (2)].ival) ); ;}
796 #line 797 "holidayparserplan.cpp"
799 YY_SYMBOL_PRINT (
"-> $$ =", yyr1_[yyn], &yyval, &yyloc);
805 yysemantic_stack_.push (yyval);
806 yylocation_stack_.push (yyloc);
810 yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
811 if (0 <= yystate && yystate <= yylast_
812 && yycheck_[yystate] == yystate_stack_[0])
813 yystate = yytable_[yystate];
815 yystate = yydefgoto_[yyn - yyntokens_];
826 error (yylloc, yysyntax_error_ (yystate, yytoken));
829 yyerror_range[0] = yylloc;
830 if (yyerrstatus_ == 3)
835 if (yychar <= yyeof_)
838 if (yychar == yyeof_)
843 yydestruct_ (
"Error: discarding", yytoken, &yylval, &yylloc);
864 yyerror_range[0] = yylocation_stack_[yylen - 1];
869 yystate = yystate_stack_[0];
880 yyn = yypact_[yystate];
881 if (yyn != yypact_ninf_)
884 if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
893 if (yystate_stack_.height () == 1)
896 yyerror_range[0] = yylocation_stack_[0];
897 yydestruct_ (
"Error: popping",
899 &yysemantic_stack_[0], &yylocation_stack_[0]);
901 yystate = yystate_stack_[0];
908 yyerror_range[1] = yylloc;
911 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
912 yysemantic_stack_.push (yylval);
913 yylocation_stack_.push (yyloc);
916 YY_SYMBOL_PRINT (
"Shifting", yystos_[yyn],
917 &yysemantic_stack_[0], &yylocation_stack_[0]);
933 if (yychar != yyeof_ && yychar != yyempty_)
934 yydestruct_ (
"Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
939 while (yystate_stack_.height () != 1)
941 yydestruct_ (
"Cleanup: popping",
942 yystos_[yystate_stack_[0]],
943 &yysemantic_stack_[0],
944 &yylocation_stack_[0]);
953 HolidayParserPlan::yysyntax_error_ (
int yystate,
int tok)
958 int yyn = yypact_[yystate];
959 if (yypact_ninf_ < yyn && yyn <= yylast_)
963 int yyxbegin = yyn < 0 ? -yyn : 0;
966 int yychecklim = yylast_ - yyn + 1;
967 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
969 for (
int x = yyxbegin; x < yyxend; ++x)
970 if (yycheck_[x + yyn] == x && x != yyterror_)
981 res =
"syntax error, unexpected ";
982 res += yytnamerr_ (yytname_[tok]);
986 for (
int x = yyxbegin; x < yyxend; ++x)
987 if (yycheck_[x + yyn] == x && x != yyterror_)
989 res += (!count++) ?
", expecting " :
" or ";
990 res += yytnamerr_ (yytname_[x]);
996 res = YY_(
"syntax error");
1003 const short int HolidayParserPlan::yypact_ninf_ = -130;
1005 HolidayParserPlan::yypact_[] =
1007 -22, 10, 24, -130, -1, -130, -130, 6, 29, 12,
1008 -130, 25, -130, 32, 13, -130, 39, -130, 60, -130,
1009 -130, 62, -130, -130, 72, -130, 115, -130, -130, 128,
1010 -130, 131, -9, -9, 66, 34, -130, -9, 47, 131,
1011 117, -130, 34, 34, 74, 61, -130, 74, 74, -130,
1012 34, 83, 157, -130, 77, 131, 131, 11, 122, 131,
1013 206, 206, 34, -130, -9, 126, -130, -130, 50, 131,
1014 -130, -130, -130, 51, 64, 131, 3, 34, 34, 34,
1015 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
1016 34, -130, 90, 74, 65, -130, 61, 74, 131, 63,
1017 -130, -130, -130, 206, 74, 131, -130, 131, -130, -130,
1018 93, 61, 248, 248, 248, 248, 248, 248, 227, 248,
1019 114, 114, 50, 50, 50, 184, 79, 94, -130, 131,
1020 -9, -130, -130, 34, -130, -130, -130, 61, 73, 34,
1021 90, 90, -130, 74, 206, -130, -130, -130, -130, -130,
1029 HolidayParserPlan::yydefact_[] =
1031 4, 0, 0, 12, 6, 5, 1, 14, 0, 8,
1032 15, 16, 7, 0, 10, 17, 0, 9, 0, 3,
1033 20, 18, 11, 19, 21, 22, 0, 83, 63, 30,
1034 85, 0, 30, 30, 0, 0, 13, 30, 0, 61,
1035 50, 82, 0, 0, 38, 0, 86, 38, 38, 84,
1036 0, 0, 0, 64, 33, 0, 45, 30, 0, 47,
1037 31, 32, 0, 26, 30, 50, 23, 24, 79, 0,
1038 51, 52, 53, 0, 0, 61, 62, 0, 0, 0,
1039 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1040 0, 81, 35, 38, 43, 46, 0, 38, 63, 40,
1041 61, 62, 48, 39, 38, 0, 80, 0, 58, 57,
1042 0, 0, 67, 68, 69, 70, 71, 72, 65, 66,
1043 74, 73, 75, 76, 77, 0, 36, 0, 25, 0,
1044 30, 27, 49, 41, 29, 59, 56, 0, 54, 0,
1045 35, 35, 44, 38, 42, 60, 55, 78, 37, 34,
1051 HolidayParserPlan::yypgoto_[] =
1053 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1054 -130, -130, -130, -130, -23, -130, -129, -20, 68, -130,
1055 -13, 106, -27, -26, -130
1060 HolidayParserPlan::yydefgoto_[] =
1062 -1, 2, 3, 4, 9, 14, 19, 7, 11, 16,
1063 24, 21, 26, 36, 44, 93, 127, 63, 37, 73,
1070 const signed char HolidayParserPlan::yytable_ninf_ = -63;
1072 HolidayParserPlan::yytable_[] =
1074 40, 42, 43, 45, 1, 46, -2, 109, 110, 47,
1075 48, 148, 149, 56, 54, 60, 61, 5, 10, 65,
1076 96, 42, 43, 68, 6, 76, 8, 66, 67, 94,
1077 95, 15, 101, 102, 97, 103, 12, 27, 74, 17,
1078 13, 104, 18, 105, 111, 99, 20, 30, 31, 108,
1079 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1080 122, 123, 124, 125, 27, 28, 34, 22, 23, 49,
1081 101, 50, 132, 128, 30, 31, 51, 131, 35, 135,
1082 25, 136, 55, 130, 134, 101, 27, 28, 69, 90,
1083 70, 62, 92, 34, 106, 126, 30, 31, 138, 107,
1084 129, 71, 137, 142, 133, 35, 144, 143, 72, 140,
1085 141, 101, 147, 64, 146, 34, 0, 0, 27, 28,
1086 29, 28, 57, 150, 145, 27, 98, 35, 30, 31,
1087 28, 27, 39, 32, 27, 30, 31, 0, 42, 43,
1088 33, 30, 31, 0, 30, 31, 59, 34, 87, 88,
1089 89, 39, -62, 90, 34, 0, 0, 75, 58, 35,
1090 34, -62, 0, 34, 0, 0, 35, 58, 0, 0,
1091 0, 59, 35, 0, 0, 35, 77, 78, 79, 80,
1092 81, 82, 0, 0, 0, 0, 0, 83, 84, 85,
1093 86, 87, 88, 89, 0, 0, 90, 0, 0, 0,
1094 0, 0, 91, 77, 78, 79, 80, 81, 82, 0,
1095 0, 0, 0, 0, 83, 84, 85, 86, 87, 88,
1096 89, 0, 0, 90, 139, 77, 78, 79, 80, 81,
1097 82, 0, 0, 0, 0, 0, 83, 84, 85, 86,
1098 87, 88, 89, 0, 0, 90, 77, 78, 79, 80,
1099 81, 82, 0, 0, 0, 0, 0, 0, 84, 85,
1100 86, 87, 88, 89, 0, 0, 90, 77, 78, 79,
1101 80, 81, 82, 0, 0, 0, 0, 0, 0, 0,
1102 85, 86, 87, 88, 89, 0, 0, 90
1107 HolidayParserPlan::yycheck_[] =
1109 26, 10, 11, 29, 26, 31, 0, 4, 5, 32,
1110 33, 140, 141, 39, 37, 42, 43, 7, 12, 45,
1111 9, 10, 11, 50, 0, 51, 27, 47, 48, 55,
1112 56, 6, 58, 59, 57, 62, 7, 3, 51, 7,
1113 28, 64, 29, 69, 41, 58, 7, 13, 14, 75,
1114 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1115 87, 88, 89, 90, 3, 4, 32, 7, 6, 3,
1116 96, 37, 98, 93, 13, 14, 42, 97, 44, 105,
1117 8, 107, 35, 96, 104, 111, 3, 4, 5, 39,
1118 7, 17, 15, 32, 43, 5, 13, 14, 111, 35,
1119 35, 18, 9, 129, 41, 44, 133, 130, 25, 30,
1120 16, 137, 139, 45, 41, 32, -1, -1, 3, 4,
1121 5, 4, 5, 143, 137, 3, 4, 44, 13, 14,
1122 4, 3, 26, 18, 3, 13, 14, -1, 10, 11,
1123 25, 13, 14, -1, 13, 14, 40, 32, 34, 35,
1124 36, 45, 35, 39, 32, -1, -1, 51, 41, 44,
1125 32, 35, -1, 32, -1, -1, 44, 41, -1, -1,
1126 -1, 65, 44, -1, -1, 44, 19, 20, 21, 22,
1127 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
1128 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
1129 -1, -1, 45, 19, 20, 21, 22, 23, 24, -1,
1130 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
1131 36, -1, -1, 39, 40, 19, 20, 21, 22, 23,
1132 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
1133 34, 35, 36, -1, -1, 39, 19, 20, 21, 22,
1134 23, 24, -1, -1, -1, -1, -1, -1, 31, 32,
1135 33, 34, 35, 36, -1, -1, 39, 19, 20, 21,
1136 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
1137 32, 33, 34, 35, 36, -1, -1, 39
1143 HolidayParserPlan::yystos_[] =
1145 0, 26, 47, 48, 49, 7, 0, 53, 27, 50,
1146 12, 54, 7, 28, 51, 6, 55, 7, 29, 52,
1147 7, 57, 7, 6, 56, 8, 58, 3, 4, 5,
1148 13, 14, 18, 25, 32, 44, 59, 64, 66, 67,
1149 69, 70, 10, 11, 60, 69, 69, 60, 60, 3,
1150 37, 42, 68, 69, 60, 35, 69, 5, 41, 67,
1151 68, 68, 17, 63, 64, 69, 63, 63, 68, 5,
1152 7, 18, 25, 65, 66, 67, 69, 19, 20, 21,
1153 22, 23, 24, 30, 31, 32, 33, 34, 35, 36,
1154 39, 45, 15, 61, 69, 69, 9, 60, 4, 66,
1155 67, 69, 69, 68, 60, 69, 43, 35, 69, 4,
1156 5, 41, 68, 68, 68, 68, 68, 68, 68, 68,
1157 68, 68, 68, 68, 68, 68, 5, 62, 63, 35,
1158 66, 63, 69, 41, 63, 69, 69, 9, 66, 40,
1159 30, 16, 69, 60, 68, 66, 41, 68, 62, 62,
1166 const unsigned short int
1167 HolidayParserPlan::yytoken_number_[] =
1169 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1170 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1171 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1172 285, 286, 45, 43, 42, 47, 37, 33, 287, 63,
1173 58, 46, 91, 93, 40, 41
1179 HolidayParserPlan::yyr1_[] =
1181 0, 46, 47, 48, 49, 49, 50, 50, 51, 51,
1182 52, 52, 53, 53, 54, 54, 55, 55, 56, 56,
1183 57, 58, 58, 59, 59, 59, 59, 59, 59, 59,
1184 60, 60, 60, 61, 61, 62, 62, 62, 63, 63,
1185 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
1186 64, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1187 65, 66, 66, 67, 68, 68, 68, 68, 68, 68,
1188 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
1189 68, 69, 69, 70, 70, 70, 70
1194 HolidayParserPlan::yyr2_[] =
1196 0, 2, 2, 4, 0, 2, 0, 2, 0, 2,
1197 0, 2, 0, 7, 0, 1, 0, 1, 0, 1,
1198 1, 0, 1, 3, 3, 4, 3, 4, 6, 5,
1199 0, 2, 2, 0, 4, 0, 1, 3, 0, 2,
1200 3, 4, 5, 3, 5, 2, 3, 2, 3, 4,
1201 1, 1, 1, 1, 3, 4, 3, 2, 2, 3,
1202 4, 1, 1, 1, 1, 3, 3, 3, 3, 3,
1203 3, 3, 3, 3, 3, 3, 3, 3, 5, 2,
1207 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1211 const HolidayParserPlan::yytname_[] =
1213 "END",
"error",
"$undefined",
"NUMBER",
"MONTH",
"WDAY",
"COLOR",
1214 "STRING",
"CALENDAR",
"INOP",
"PLUS",
"MINUS",
"SMALL",
"YEAR",
1215 "LEAPYEAR",
"SHIFT",
"IF",
"LENGTH",
"EASTER",
"EQ",
"NE",
"LE",
"GE",
1216 "LT",
"GT",
"PASCHA",
"COUNTRY",
"LANGUAGE",
"NAME",
"DESCRIPTION",
"OR",
1217 "AND",
"'-'",
"'+'",
"'*'",
"'/'",
"'%'",
"'!'",
"UMINUS",
"'?'",
"':'",
1218 "'.'",
"'['",
"']'",
"'('",
"')'",
"$accept",
"planfile",
"metadata",
1219 "countrycode",
"languagecode",
"name",
"description",
"list",
"small",
1220 "stringcolor",
"daycolor",
"eventname",
"calendar",
"eventrule",
1221 "offset",
"conditionaloffset",
"wdaycondition",
"length",
"date",
1222 "reldate",
"month",
"monthnumber",
"expr",
"pexpr",
"number", 0
1228 const HolidayParserPlan::rhs_number_type
1229 HolidayParserPlan::yyrhs_[] =
1231 47, 0, -1, 48, 53, -1, 49, 50, 51, 52,
1232 -1, -1, 26, 7, -1, -1, 27, 7, -1, -1,
1233 28, 7, -1, -1, 29, 7, -1, -1, 53, 54,
1234 55, 57, 56, 58, 59, -1, -1, 12, -1, -1,
1235 6, -1, -1, 6, -1, 7, -1, -1, 8, -1,
1236 18, 60, 63, -1, 25, 60, 63, -1, 64, 60,
1237 61, 63, -1, 5, 60, 63, -1, 69, 5, 60,
1238 63, -1, 69, 5, 9, 66, 60, 63, -1, 5,
1239 69, 64, 60, 63, -1, -1, 10, 68, -1, 11,
1240 68, -1, -1, 15, 62, 16, 62, -1, -1, 5,
1241 -1, 5, 30, 62, -1, -1, 17, 68, -1, 69,
1242 41, 66, -1, 69, 41, 66, 41, -1, 69, 41,
1243 66, 41, 68, -1, 66, 35, 69, -1, 66, 35,
1244 69, 35, 69, -1, 67, 69, -1, 67, 69, 69,
1245 -1, 69, 67, -1, 69, 67, 69, -1, 69, 41,
1246 4, 69, -1, 69, -1, 7, -1, 18, -1, 25,
1247 -1, 69, 41, 66, -1, 69, 41, 66, 41, -1,
1248 66, 35, 69, -1, 69, 4, -1, 67, 69, -1,
1249 5, 69, 69, -1, 69, 5, 9, 66, -1, 67,
1250 -1, 69, -1, 4, -1, 69, -1, 68, 30, 68,
1251 -1, 68, 31, 68, -1, 68, 19, 68, -1, 68,
1252 20, 68, -1, 68, 21, 68, -1, 68, 22, 68,
1253 -1, 68, 23, 68, -1, 68, 24, 68, -1, 68,
1254 33, 68, -1, 68, 32, 68, -1, 68, 34, 68,
1255 -1, 68, 35, 68, -1, 68, 36, 68, -1, 68,
1256 39, 68, 40, 68, -1, 37, 68, -1, 42, 65,
1257 43, -1, 44, 68, 45, -1, 70, -1, 3, -1,
1258 32, 3, -1, 13, -1, 14, 69, -1
1263 const unsigned short int
1264 HolidayParserPlan::yyprhs_[] =
1266 0, 0, 3, 6, 11, 12, 15, 16, 19, 20,
1267 23, 24, 27, 28, 36, 37, 39, 40, 42, 43,
1268 45, 47, 48, 50, 54, 58, 63, 67, 72, 79,
1269 85, 86, 89, 92, 93, 98, 99, 101, 105, 106,
1270 109, 113, 118, 124, 128, 134, 137, 141, 144, 148,
1271 153, 155, 157, 159, 161, 165, 170, 174, 177, 180,
1272 184, 189, 191, 193, 195, 197, 201, 205, 209, 213,
1273 217, 221, 225, 229, 233, 237, 241, 245, 249, 255,
1274 258, 262, 266, 268, 270, 273, 275
1279 HolidayParserPlan::yyrline_[] =
1281 0, 123, 123, 126, 129, 130, 133, 134, 137, 138,
1282 141, 142, 145, 146, 149, 150, 153, 154, 157, 158,
1283 161, 164, 165, 168, 169, 170, 171, 172, 173, 174,
1284 177, 178, 179, 182, 183, 186, 187, 188, 191, 192,
1285 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
1286 205, 208, 209, 210, 211, 212, 213, 214, 215, 216,
1287 217, 220, 221, 224, 227, 228, 229, 230, 231, 232,
1288 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
1289 243, 246, 247, 250, 251, 252, 253
1294 HolidayParserPlan::yystack_print_ ()
1296 *yycdebug_ <<
"Stack now";
1297 for (state_stack_type::const_iterator i = yystate_stack_.begin ();
1298 i != yystate_stack_.end (); ++i)
1299 *yycdebug_ <<
' ' << *i;
1300 *yycdebug_ << std::endl;
1305 HolidayParserPlan::yy_reduce_print_ (
int yyrule)
1307 unsigned int yylno = yyrline_[yyrule];
1308 int yynrhs = yyr2_[yyrule];
1310 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1311 <<
" (line " << yylno <<
"), ";
1313 for (
int yyi = 0; yyi < yynrhs; yyi++)
1314 YY_SYMBOL_PRINT (
" $" << yyi + 1 <<
" =",
1315 yyrhs_[yyprhs_[yyrule] + yyi],
1316 &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),
1317 &(yylocation_stack_[(yynrhs) - (yyi + 1)]));
1322 HolidayParserPlan::token_number_type
1323 HolidayParserPlan::yytranslate_ (
int t)
1326 const token_number_type
1329 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1330 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1331 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1332 2, 2, 2, 37, 2, 2, 2, 36, 2, 2,
1333 44, 45, 34, 33, 2, 32, 41, 35, 2, 2,
1334 2, 2, 2, 2, 2, 2, 2, 2, 40, 2,
1335 2, 2, 2, 39, 2, 2, 2, 2, 2, 2,
1336 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1337 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1338 2, 42, 2, 43, 2, 2, 2, 2, 2, 2,
1339 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1340 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1341 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1342 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1343 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1344 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1345 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1346 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1347 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1348 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1349 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1350 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1351 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1352 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1353 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1354 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1355 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1356 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1357 25, 26, 27, 28, 29, 30, 31, 38
1359 if ((
unsigned int) t <= yyuser_token_number_max_)
1360 return translate_table[t];
1362 return yyundef_token_;
1365 const int HolidayParserPlan::yyeof_ = 0;
1366 const int HolidayParserPlan::yylast_ = 287;
1367 const int HolidayParserPlan::yynnts_ = 25;
1368 const int HolidayParserPlan::yyempty_ = -2;
1369 const int HolidayParserPlan::yyfinal_ = 6;
1370 const int HolidayParserPlan::yyterror_ = 1;
1371 const int HolidayParserPlan::yyerrcode_ = 256;
1372 const int HolidayParserPlan::yyntokens_ = 46;
1374 const unsigned int HolidayParserPlan::yyuser_token_number_max_ = 287;
1375 const HolidayParserPlan::token_number_type HolidayParserPlan::yyundef_token_ = 2;
1379 #line 256 "holidayparserplan.ypp"
1386 driver.
error( errorLocation, errorMessage.c_str() );