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);
214 { free( ((*yyvaluep).sval) ); };
222 HolidayParserPlan::yypop_ (
unsigned int n)
224 yystate_stack_.pop (n);
225 yysemantic_stack_.pop (n);
226 yylocation_stack_.pop (n);
259 int yychar = yyempty_;
269 int yyerrstatus_ = 0;
285 YYCDEBUG <<
"Starting parse" << std::endl;
289 #line 70 "holidayparserplan.ypp"
296 #line 295 "holidayparserplan.cpp"
301 yystate_stack_ = state_stack_type (0);
302 yysemantic_stack_ = semantic_stack_type (0);
303 yylocation_stack_ = location_stack_type (0);
304 yysemantic_stack_.push (yylval);
305 yylocation_stack_.push (yylloc);
309 yystate_stack_.push (yystate);
310 YYCDEBUG <<
"Entering state " << yystate << std::endl;
317 yyn = yypact_[yystate];
318 if (yyn == yypact_ninf_)
322 if (yychar == yyempty_)
324 YYCDEBUG <<
"Reading a token: ";
325 yychar = yylex (&yylval, &yylloc);
330 if (yychar <= yyeof_)
332 yychar = yytoken = yyeof_;
333 YYCDEBUG <<
"Now at end of input." << std::endl;
337 yytoken = yytranslate_ (yychar);
338 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
344 if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yytoken)
351 if (yyn == 0 || yyn == yytable_ninf_)
362 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
365 if (yychar != yyeof_)
368 yysemantic_stack_.push (yylval);
369 yylocation_stack_.push (yylloc);
383 yyn = yydefact_[yystate];
400 yyval = yysemantic_stack_[yylen - 1];
402 yyval = yysemantic_stack_[0];
406 YYLLOC_DEFAULT (yyloc, slice, yylen);
408 YY_REDUCE_PRINT (yyn);
412 #line 129 "holidayparserplan.ypp"
413 { driver.setFileCountryCode( QString() ); ;}
417 #line 130 "holidayparserplan.ypp"
419 char *s = yysemantic_stack_[(2) - (2)].sval;
420 driver.setFileCountryCode( QString::fromUtf8( s ) );
422 yysemantic_stack_[(2) - (2)].sval = NULL;
427 #line 133 "holidayparserplan.ypp"
428 { driver.setFileLanguageCode( QString() ); ;}
432 #line 134 "holidayparserplan.ypp"
434 char *s = yysemantic_stack_[(2) - (2)].sval;
435 driver.setFileLanguageCode( QString::fromUtf8( s ) );
437 yysemantic_stack_[(2) - (2)].sval = NULL;
442 #line 137 "holidayparserplan.ypp"
443 { driver.setFileName( QString() ); ;}
447 #line 138 "holidayparserplan.ypp"
449 char *s = yysemantic_stack_[(2) - (2)].sval;
450 driver.setFileName( QString::fromUtf8( s ) );
452 yysemantic_stack_[(2) - (2)].sval = NULL;
457 #line 141 "holidayparserplan.ypp"
458 { driver.setFileDescription( QString() ); ;}
462 #line 142 "holidayparserplan.ypp"
464 char *s = yysemantic_stack_[(2) - (2)].sval;
465 driver.setFileDescription( QString::fromUtf8( s ) );
467 yysemantic_stack_[(2) - (2)].sval = NULL;
472 #line 153 "holidayparserplan.ypp"
473 { driver.setEventColorName( 0 ); ;}
477 #line 154 "holidayparserplan.ypp"
478 { driver.setEventColorName( (yysemantic_stack_[(1) - (1)].ival) ); ;}
482 #line 157 "holidayparserplan.ypp"
483 { driver.setEventColorDay( 0 ); ;}
487 #line 158 "holidayparserplan.ypp"
488 { driver.setEventColorDay( (yysemantic_stack_[(1) - (1)].ival) ); ;}
492 #line 161 "holidayparserplan.ypp"
494 char *s = yysemantic_stack_[(1) - (1)].sval;
495 driver.setEventName( QString::fromUtf8( s ) );
497 yysemantic_stack_[(1) - (1)].sval = NULL;
502 #line 164 "holidayparserplan.ypp"
503 { driver.setEventCalendarType(
"gregorian" ); ;}
507 #line 165 "holidayparserplan.ypp"
508 { driver.setEventCalendarType( QString::fromUtf8( (yysemantic_stack_[(1) - (1)].sval) ) ); ;}
512 #line 168 "holidayparserplan.ypp"
513 { driver.setFromEaster( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
517 #line 169 "holidayparserplan.ypp"
518 { driver.setFromPascha( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
522 #line 170 "holidayparserplan.ypp"
523 { driver.setFromDate( (yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
527 #line 171 "holidayparserplan.ypp"
528 { driver.setFromWeekdayInMonth( 1, (yysemantic_stack_[(3) - (1)].ival), 1, (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
532 #line 172 "holidayparserplan.ypp"
533 { driver.setFromWeekdayInMonth( (yysemantic_stack_[(4) - (1)].ival), (yysemantic_stack_[(4) - (2)].ival), 1, (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
537 #line 173 "holidayparserplan.ypp"
538 { 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) ); ;}
542 #line 174 "holidayparserplan.ypp"
543 { driver.setFromRelativeWeekday( (yysemantic_stack_[(5) - (2)].ival), (yysemantic_stack_[(5) - (1)].ival), (yysemantic_stack_[(5) - (4)].ival), (yysemantic_stack_[(5) - (5)].ival) ); ;}
547 #line 177 "holidayparserplan.ypp"
548 { (yyval.ival) = 0; ;}
552 #line 178 "holidayparserplan.ypp"
553 { (yyval.ival) = (yysemantic_stack_[(2) - (2)].ival); ;}
557 #line 179 "holidayparserplan.ypp"
558 { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); ;}
562 #line 182 "holidayparserplan.ypp"
563 { (yyval.ival) = 0; ;}
567 #line 183 "holidayparserplan.ypp"
568 { (yyval.ival) = ( (yysemantic_stack_[(4) - (2)].ival) << 8 ) | (yysemantic_stack_[(4) - (4)].ival); ;}
572 #line 186 "holidayparserplan.ypp"
573 { (yyval.ival) = 0; ;}
577 #line 187 "holidayparserplan.ypp"
578 { (yyval.ival) = ( 1 << (yysemantic_stack_[(1) - (1)].ival) ); ;}
582 #line 188 "holidayparserplan.ypp"
583 { (yyval.ival) = ( 1 << (yysemantic_stack_[(3) - (1)].ival) ) | (yysemantic_stack_[(3) - (3)].ival); ;}
587 #line 191 "holidayparserplan.ypp"
588 { (yyval.ival) = 1; ;}
592 #line 192 "holidayparserplan.ypp"
593 { (yyval.ival) = (yysemantic_stack_[(2) - (2)].ival); ;}
597 #line 195 "holidayparserplan.ypp"
598 { driver.setEventDate( -99999, (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
602 #line 196 "holidayparserplan.ypp"
603 { driver.setEventDate( -99999, (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
607 #line 197 "holidayparserplan.ypp"
608 { driver.setEventDate( (yysemantic_stack_[(5) - (5)].ival), (yysemantic_stack_[(5) - (3)].ival), (yysemantic_stack_[(5) - (1)].ival) ); ;}
612 #line 198 "holidayparserplan.ypp"
613 { driver.setEventDate( -99999, (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
617 #line 199 "holidayparserplan.ypp"
618 { driver.setEventDate( (yysemantic_stack_[(5) - (5)].ival), (yysemantic_stack_[(5) - (1)].ival), (yysemantic_stack_[(5) - (3)].ival) ); ;}
622 #line 200 "holidayparserplan.ypp"
623 { driver.setEventDate( -99999, (yysemantic_stack_[(2) - (1)].ival), (yysemantic_stack_[(2) - (2)].ival) ); ;}
627 #line 201 "holidayparserplan.ypp"
628 { driver.setEventDate( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (2)].ival) ); ;}
632 #line 202 "holidayparserplan.ypp"
633 { driver.setEventDate( -99999, (yysemantic_stack_[(2) - (2)].ival), (yysemantic_stack_[(2) - (1)].ival) ); ;}
637 #line 203 "holidayparserplan.ypp"
638 { driver.setEventDate( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
642 #line 204 "holidayparserplan.ypp"
643 { driver.setEventDate( (yysemantic_stack_[(4) - (4)].ival), (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
647 #line 205 "holidayparserplan.ypp"
648 { driver.setEventDate( (yysemantic_stack_[(1) - (1)].ival) ); ;}
652 #line 208 "holidayparserplan.ypp"
654 char *s = yysemantic_stack_[(1) - (1)].sval;
655 (yyval.ival) = driver.julianDayFromEventName( s );
657 yysemantic_stack_[(1) - (1)].sval = NULL;
662 #line 209 "holidayparserplan.ypp"
663 { (yyval.ival) = driver.julianDayFromEaster(); ;}
667 #line 210 "holidayparserplan.ypp"
668 { (yyval.ival) = driver.julianDayFromPascha(); ;}
672 #line 211 "holidayparserplan.ypp"
673 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(3) - (3)].ival), (yysemantic_stack_[(3) - (1)].ival) ); ;}
677 #line 212 "holidayparserplan.ypp"
678 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(4) - (3)].ival), (yysemantic_stack_[(4) - (1)].ival) ); ;}
682 #line 213 "holidayparserplan.ypp"
683 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
687 #line 214 "holidayparserplan.ypp"
688 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(2) - (2)].ival), (yysemantic_stack_[(2) - (1)].ival) ); ;}
692 #line 215 "holidayparserplan.ypp"
693 { (yyval.ival) = driver.julianDayFromMonthDay( (yysemantic_stack_[(2) - (1)].ival), (yysemantic_stack_[(2) - (2)].ival) ); ;}
697 #line 216 "holidayparserplan.ypp"
698 { (yyval.ival) = driver.julianDayFromRelativeWeekday( (yysemantic_stack_[(3) - (2)].ival), (yysemantic_stack_[(3) - (1)].ival), (yysemantic_stack_[(3) - (3)].ival) ); ;}
702 #line 217 "holidayparserplan.ypp"
703 { (yyval.ival) = driver.julianDayFromWeekdayInMonth( (yysemantic_stack_[(4) - (1)].ival), (yysemantic_stack_[(4) - (2)].ival), (yysemantic_stack_[(4) - (4)].ival) ); ;}
707 #line 221 "holidayparserplan.ypp"
708 { (yyval.ival) = driver.adjustedMonthNumber( (yysemantic_stack_[(1) - (1)].ival) ); ;}
712 #line 224 "holidayparserplan.ypp"
713 { (yyval.ival) = driver.adjustedMonthNumber( (yysemantic_stack_[(1) - (1)].ival) ); ;}
717 #line 227 "holidayparserplan.ypp"
718 { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); ;}
722 #line 228 "holidayparserplan.ypp"
723 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) || (yysemantic_stack_[(3) - (3)].ival); ;}
727 #line 229 "holidayparserplan.ypp"
728 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) && (yysemantic_stack_[(3) - (3)].ival); ;}
732 #line 230 "holidayparserplan.ypp"
733 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) == (yysemantic_stack_[(3) - (3)].ival); ;}
737 #line 231 "holidayparserplan.ypp"
738 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) != (yysemantic_stack_[(3) - (3)].ival); ;}
742 #line 232 "holidayparserplan.ypp"
743 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) <= (yysemantic_stack_[(3) - (3)].ival); ;}
747 #line 233 "holidayparserplan.ypp"
748 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) >= (yysemantic_stack_[(3) - (3)].ival); ;}
752 #line 234 "holidayparserplan.ypp"
753 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) < (yysemantic_stack_[(3) - (3)].ival); ;}
757 #line 235 "holidayparserplan.ypp"
758 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) > (yysemantic_stack_[(3) - (3)].ival); ;}
762 #line 236 "holidayparserplan.ypp"
763 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) + (yysemantic_stack_[(3) - (3)].ival); ;}
767 #line 237 "holidayparserplan.ypp"
768 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) - (yysemantic_stack_[(3) - (3)].ival); ;}
772 #line 238 "holidayparserplan.ypp"
773 { (yyval.ival) = (yysemantic_stack_[(3) - (1)].ival) * (yysemantic_stack_[(3) - (3)].ival); ;}
777 #line 239 "holidayparserplan.ypp"
778 { (yyval.ival) = (yysemantic_stack_[(3) - (3)].ival) ? (yysemantic_stack_[(3) - (1)].ival) / (yysemantic_stack_[(3) - (3)].ival) : 0; ;}
782 #line 240 "holidayparserplan.ypp"
783 { (yyval.ival) = (yysemantic_stack_[(3) - (3)].ival) ? (yysemantic_stack_[(3) - (1)].ival) % (yysemantic_stack_[(3) - (3)].ival) : 0; ;}
787 #line 241 "holidayparserplan.ypp"
788 { (yyval.ival) = (yysemantic_stack_[(5) - (1)].ival) ? (yysemantic_stack_[(5) - (3)].ival) : (yysemantic_stack_[(5) - (5)].ival); ;}
792 #line 242 "holidayparserplan.ypp"
793 { (yyval.ival) = !(yysemantic_stack_[(2) - (2)].ival); ;}
797 #line 243 "holidayparserplan.ypp"
798 { (yyval.ival) = (yysemantic_stack_[(3) - (2)].ival); ;}
802 #line 246 "holidayparserplan.ypp"
803 { (yyval.ival) = (yysemantic_stack_[(3) - (2)].ival); ;}
807 #line 247 "holidayparserplan.ypp"
808 { (yyval.ival) = (yysemantic_stack_[(1) - (1)].ival); ;}
812 #line 251 "holidayparserplan.ypp"
813 { (yyval.ival) = -(yysemantic_stack_[(2) - (2)].ival); ;}
817 #line 252 "holidayparserplan.ypp"
818 { (yyval.ival) = driver.parseYear(); ;}
822 #line 253 "holidayparserplan.ypp"
823 { (yyval.ival) = driver.isLeapYear( (yysemantic_stack_[(2) - (2)].ival) ); ;}
828 #line 797 "holidayparserplan.cpp"
831 YY_SYMBOL_PRINT (
"-> $$ =", yyr1_[yyn], &yyval, &yyloc);
837 yysemantic_stack_.push (yyval);
838 yylocation_stack_.push (yyloc);
842 yystate = yypgoto_[yyn - yyntokens_] + yystate_stack_[0];
843 if (0 <= yystate && yystate <= yylast_
844 && yycheck_[yystate] == yystate_stack_[0])
845 yystate = yytable_[yystate];
847 yystate = yydefgoto_[yyn - yyntokens_];
858 error (yylloc, yysyntax_error_ (yystate, yytoken));
861 yyerror_range[0] = yylloc;
862 if (yyerrstatus_ == 3)
867 if (yychar <= yyeof_)
870 if (yychar == yyeof_)
875 yydestruct_ (
"Error: discarding", yytoken, &yylval, &yylloc);
896 yyerror_range[0] = yylocation_stack_[yylen - 1];
901 yystate = yystate_stack_[0];
912 yyn = yypact_[yystate];
913 if (yyn != yypact_ninf_)
916 if (0 <= yyn && yyn <= yylast_ && yycheck_[yyn] == yyterror_)
925 if (yystate_stack_.height () == 1)
928 yyerror_range[0] = yylocation_stack_[0];
929 yydestruct_ (
"Error: popping",
931 &yysemantic_stack_[0], &yylocation_stack_[0]);
933 yystate = yystate_stack_[0];
940 yyerror_range[1] = yylloc;
943 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
944 yysemantic_stack_.push (yylval);
945 yylocation_stack_.push (yyloc);
948 YY_SYMBOL_PRINT (
"Shifting", yystos_[yyn],
949 &yysemantic_stack_[0], &yylocation_stack_[0]);
965 if (yychar != yyeof_ && yychar != yyempty_)
966 yydestruct_ (
"Cleanup: discarding lookahead", yytoken, &yylval, &yylloc);
971 while (yystate_stack_.height () != 1)
973 yydestruct_ (
"Cleanup: popping",
974 yystos_[yystate_stack_[0]],
975 &yysemantic_stack_[0],
976 &yylocation_stack_[0]);
985 HolidayParserPlan::yysyntax_error_ (
int yystate,
int tok)
990 int yyn = yypact_[yystate];
991 if (yypact_ninf_ < yyn && yyn <= yylast_)
995 int yyxbegin = yyn < 0 ? -yyn : 0;
998 int yychecklim = yylast_ - yyn + 1;
999 int yyxend = yychecklim < yyntokens_ ? yychecklim : yyntokens_;
1001 for (
int x = yyxbegin; x < yyxend; ++x)
1002 if (yycheck_[x + yyn] == x && x != yyterror_)
1013 res =
"syntax error, unexpected ";
1014 res += yytnamerr_ (yytname_[tok]);
1018 for (
int x = yyxbegin; x < yyxend; ++x)
1019 if (yycheck_[x + yyn] == x && x != yyterror_)
1021 res += (!count++) ?
", expecting " :
" or ";
1022 res += yytnamerr_ (yytname_[x]);
1028 res = YY_(
"syntax error");
1035 const short int HolidayParserPlan::yypact_ninf_ = -130;
1037 HolidayParserPlan::yypact_[] =
1039 -22, 10, 24, -130, -1, -130, -130, 6, 29, 12,
1040 -130, 25, -130, 32, 13, -130, 39, -130, 60, -130,
1041 -130, 62, -130, -130, 72, -130, 115, -130, -130, 128,
1042 -130, 131, -9, -9, 66, 34, -130, -9, 47, 131,
1043 117, -130, 34, 34, 74, 61, -130, 74, 74, -130,
1044 34, 83, 157, -130, 77, 131, 131, 11, 122, 131,
1045 206, 206, 34, -130, -9, 126, -130, -130, 50, 131,
1046 -130, -130, -130, 51, 64, 131, 3, 34, 34, 34,
1047 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,
1048 34, -130, 90, 74, 65, -130, 61, 74, 131, 63,
1049 -130, -130, -130, 206, 74, 131, -130, 131, -130, -130,
1050 93, 61, 248, 248, 248, 248, 248, 248, 227, 248,
1051 114, 114, 50, 50, 50, 184, 79, 94, -130, 131,
1052 -9, -130, -130, 34, -130, -130, -130, 61, 73, 34,
1053 90, 90, -130, 74, 206, -130, -130, -130, -130, -130,
1061 HolidayParserPlan::yydefact_[] =
1063 4, 0, 0, 12, 6, 5, 1, 14, 0, 8,
1064 15, 16, 7, 0, 10, 17, 0, 9, 0, 3,
1065 20, 18, 11, 19, 21, 22, 0, 83, 63, 30,
1066 85, 0, 30, 30, 0, 0, 13, 30, 0, 61,
1067 50, 82, 0, 0, 38, 0, 86, 38, 38, 84,
1068 0, 0, 0, 64, 33, 0, 45, 30, 0, 47,
1069 31, 32, 0, 26, 30, 50, 23, 24, 79, 0,
1070 51, 52, 53, 0, 0, 61, 62, 0, 0, 0,
1071 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1072 0, 81, 35, 38, 43, 46, 0, 38, 63, 40,
1073 61, 62, 48, 39, 38, 0, 80, 0, 58, 57,
1074 0, 0, 67, 68, 69, 70, 71, 72, 65, 66,
1075 74, 73, 75, 76, 77, 0, 36, 0, 25, 0,
1076 30, 27, 49, 41, 29, 59, 56, 0, 54, 0,
1077 35, 35, 44, 38, 42, 60, 55, 78, 37, 34,
1083 HolidayParserPlan::yypgoto_[] =
1085 -130, -130, -130, -130, -130, -130, -130, -130, -130, -130,
1086 -130, -130, -130, -130, -23, -130, -129, -20, 68, -130,
1087 -13, 106, -27, -26, -130
1092 HolidayParserPlan::yydefgoto_[] =
1094 -1, 2, 3, 4, 9, 14, 19, 7, 11, 16,
1095 24, 21, 26, 36, 44, 93, 127, 63, 37, 73,
1102 const signed char HolidayParserPlan::yytable_ninf_ = -63;
1104 HolidayParserPlan::yytable_[] =
1106 40, 42, 43, 45, 1, 46, -2, 109, 110, 47,
1107 48, 148, 149, 56, 54, 60, 61, 5, 10, 65,
1108 96, 42, 43, 68, 6, 76, 8, 66, 67, 94,
1109 95, 15, 101, 102, 97, 103, 12, 27, 74, 17,
1110 13, 104, 18, 105, 111, 99, 20, 30, 31, 108,
1111 112, 113, 114, 115, 116, 117, 118, 119, 120, 121,
1112 122, 123, 124, 125, 27, 28, 34, 22, 23, 49,
1113 101, 50, 132, 128, 30, 31, 51, 131, 35, 135,
1114 25, 136, 55, 130, 134, 101, 27, 28, 69, 90,
1115 70, 62, 92, 34, 106, 126, 30, 31, 138, 107,
1116 129, 71, 137, 142, 133, 35, 144, 143, 72, 140,
1117 141, 101, 147, 64, 146, 34, 0, 0, 27, 28,
1118 29, 28, 57, 150, 145, 27, 98, 35, 30, 31,
1119 28, 27, 39, 32, 27, 30, 31, 0, 42, 43,
1120 33, 30, 31, 0, 30, 31, 59, 34, 87, 88,
1121 89, 39, -62, 90, 34, 0, 0, 75, 58, 35,
1122 34, -62, 0, 34, 0, 0, 35, 58, 0, 0,
1123 0, 59, 35, 0, 0, 35, 77, 78, 79, 80,
1124 81, 82, 0, 0, 0, 0, 0, 83, 84, 85,
1125 86, 87, 88, 89, 0, 0, 90, 0, 0, 0,
1126 0, 0, 91, 77, 78, 79, 80, 81, 82, 0,
1127 0, 0, 0, 0, 83, 84, 85, 86, 87, 88,
1128 89, 0, 0, 90, 139, 77, 78, 79, 80, 81,
1129 82, 0, 0, 0, 0, 0, 83, 84, 85, 86,
1130 87, 88, 89, 0, 0, 90, 77, 78, 79, 80,
1131 81, 82, 0, 0, 0, 0, 0, 0, 84, 85,
1132 86, 87, 88, 89, 0, 0, 90, 77, 78, 79,
1133 80, 81, 82, 0, 0, 0, 0, 0, 0, 0,
1134 85, 86, 87, 88, 89, 0, 0, 90
1139 HolidayParserPlan::yycheck_[] =
1141 26, 10, 11, 29, 26, 31, 0, 4, 5, 32,
1142 33, 140, 141, 39, 37, 42, 43, 7, 12, 45,
1143 9, 10, 11, 50, 0, 51, 27, 47, 48, 55,
1144 56, 6, 58, 59, 57, 62, 7, 3, 51, 7,
1145 28, 64, 29, 69, 41, 58, 7, 13, 14, 75,
1146 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
1147 87, 88, 89, 90, 3, 4, 32, 7, 6, 3,
1148 96, 37, 98, 93, 13, 14, 42, 97, 44, 105,
1149 8, 107, 35, 96, 104, 111, 3, 4, 5, 39,
1150 7, 17, 15, 32, 43, 5, 13, 14, 111, 35,
1151 35, 18, 9, 129, 41, 44, 133, 130, 25, 30,
1152 16, 137, 139, 45, 41, 32, -1, -1, 3, 4,
1153 5, 4, 5, 143, 137, 3, 4, 44, 13, 14,
1154 4, 3, 26, 18, 3, 13, 14, -1, 10, 11,
1155 25, 13, 14, -1, 13, 14, 40, 32, 34, 35,
1156 36, 45, 35, 39, 32, -1, -1, 51, 41, 44,
1157 32, 35, -1, 32, -1, -1, 44, 41, -1, -1,
1158 -1, 65, 44, -1, -1, 44, 19, 20, 21, 22,
1159 23, 24, -1, -1, -1, -1, -1, 30, 31, 32,
1160 33, 34, 35, 36, -1, -1, 39, -1, -1, -1,
1161 -1, -1, 45, 19, 20, 21, 22, 23, 24, -1,
1162 -1, -1, -1, -1, 30, 31, 32, 33, 34, 35,
1163 36, -1, -1, 39, 40, 19, 20, 21, 22, 23,
1164 24, -1, -1, -1, -1, -1, 30, 31, 32, 33,
1165 34, 35, 36, -1, -1, 39, 19, 20, 21, 22,
1166 23, 24, -1, -1, -1, -1, -1, -1, 31, 32,
1167 33, 34, 35, 36, -1, -1, 39, 19, 20, 21,
1168 22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
1169 32, 33, 34, 35, 36, -1, -1, 39
1175 HolidayParserPlan::yystos_[] =
1177 0, 26, 47, 48, 49, 7, 0, 53, 27, 50,
1178 12, 54, 7, 28, 51, 6, 55, 7, 29, 52,
1179 7, 57, 7, 6, 56, 8, 58, 3, 4, 5,
1180 13, 14, 18, 25, 32, 44, 59, 64, 66, 67,
1181 69, 70, 10, 11, 60, 69, 69, 60, 60, 3,
1182 37, 42, 68, 69, 60, 35, 69, 5, 41, 67,
1183 68, 68, 17, 63, 64, 69, 63, 63, 68, 5,
1184 7, 18, 25, 65, 66, 67, 69, 19, 20, 21,
1185 22, 23, 24, 30, 31, 32, 33, 34, 35, 36,
1186 39, 45, 15, 61, 69, 69, 9, 60, 4, 66,
1187 67, 69, 69, 68, 60, 69, 43, 35, 69, 4,
1188 5, 41, 68, 68, 68, 68, 68, 68, 68, 68,
1189 68, 68, 68, 68, 68, 68, 5, 62, 63, 35,
1190 66, 63, 69, 41, 63, 69, 69, 9, 66, 40,
1191 30, 16, 69, 60, 68, 66, 41, 68, 62, 62,
1198 const unsigned short int
1199 HolidayParserPlan::yytoken_number_[] =
1201 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
1202 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1203 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1204 285, 286, 45, 43, 42, 47, 37, 33, 287, 63,
1205 58, 46, 91, 93, 40, 41
1211 HolidayParserPlan::yyr1_[] =
1213 0, 46, 47, 48, 49, 49, 50, 50, 51, 51,
1214 52, 52, 53, 53, 54, 54, 55, 55, 56, 56,
1215 57, 58, 58, 59, 59, 59, 59, 59, 59, 59,
1216 60, 60, 60, 61, 61, 62, 62, 62, 63, 63,
1217 64, 64, 64, 64, 64, 64, 64, 64, 64, 64,
1218 64, 65, 65, 65, 65, 65, 65, 65, 65, 65,
1219 65, 66, 66, 67, 68, 68, 68, 68, 68, 68,
1220 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
1221 68, 69, 69, 70, 70, 70, 70
1226 HolidayParserPlan::yyr2_[] =
1228 0, 2, 2, 4, 0, 2, 0, 2, 0, 2,
1229 0, 2, 0, 7, 0, 1, 0, 1, 0, 1,
1230 1, 0, 1, 3, 3, 4, 3, 4, 6, 5,
1231 0, 2, 2, 0, 4, 0, 1, 3, 0, 2,
1232 3, 4, 5, 3, 5, 2, 3, 2, 3, 4,
1233 1, 1, 1, 1, 3, 4, 3, 2, 2, 3,
1234 4, 1, 1, 1, 1, 3, 3, 3, 3, 3,
1235 3, 3, 3, 3, 3, 3, 3, 3, 5, 2,
1239 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
1243 const HolidayParserPlan::yytname_[] =
1245 "END",
"error",
"$undefined",
"NUMBER",
"MONTH",
"WDAY",
"COLOR",
1246 "STRING",
"CALENDAR",
"INOP",
"PLUS",
"MINUS",
"SMALL",
"YEAR",
1247 "LEAPYEAR",
"SHIFT",
"IF",
"LENGTH",
"EASTER",
"EQ",
"NE",
"LE",
"GE",
1248 "LT",
"GT",
"PASCHA",
"COUNTRY",
"LANGUAGE",
"NAME",
"DESCRIPTION",
"OR",
1249 "AND",
"'-'",
"'+'",
"'*'",
"'/'",
"'%'",
"'!'",
"UMINUS",
"'?'",
"':'",
1250 "'.'",
"'['",
"']'",
"'('",
"')'",
"$accept",
"planfile",
"metadata",
1251 "countrycode",
"languagecode",
"name",
"description",
"list",
"small",
1252 "stringcolor",
"daycolor",
"eventname",
"calendar",
"eventrule",
1253 "offset",
"conditionaloffset",
"wdaycondition",
"length",
"date",
1254 "reldate",
"month",
"monthnumber",
"expr",
"pexpr",
"number", 0
1260 const HolidayParserPlan::rhs_number_type
1261 HolidayParserPlan::yyrhs_[] =
1263 47, 0, -1, 48, 53, -1, 49, 50, 51, 52,
1264 -1, -1, 26, 7, -1, -1, 27, 7, -1, -1,
1265 28, 7, -1, -1, 29, 7, -1, -1, 53, 54,
1266 55, 57, 56, 58, 59, -1, -1, 12, -1, -1,
1267 6, -1, -1, 6, -1, 7, -1, -1, 8, -1,
1268 18, 60, 63, -1, 25, 60, 63, -1, 64, 60,
1269 61, 63, -1, 5, 60, 63, -1, 69, 5, 60,
1270 63, -1, 69, 5, 9, 66, 60, 63, -1, 5,
1271 69, 64, 60, 63, -1, -1, 10, 68, -1, 11,
1272 68, -1, -1, 15, 62, 16, 62, -1, -1, 5,
1273 -1, 5, 30, 62, -1, -1, 17, 68, -1, 69,
1274 41, 66, -1, 69, 41, 66, 41, -1, 69, 41,
1275 66, 41, 68, -1, 66, 35, 69, -1, 66, 35,
1276 69, 35, 69, -1, 67, 69, -1, 67, 69, 69,
1277 -1, 69, 67, -1, 69, 67, 69, -1, 69, 41,
1278 4, 69, -1, 69, -1, 7, -1, 18, -1, 25,
1279 -1, 69, 41, 66, -1, 69, 41, 66, 41, -1,
1280 66, 35, 69, -1, 69, 4, -1, 67, 69, -1,
1281 5, 69, 69, -1, 69, 5, 9, 66, -1, 67,
1282 -1, 69, -1, 4, -1, 69, -1, 68, 30, 68,
1283 -1, 68, 31, 68, -1, 68, 19, 68, -1, 68,
1284 20, 68, -1, 68, 21, 68, -1, 68, 22, 68,
1285 -1, 68, 23, 68, -1, 68, 24, 68, -1, 68,
1286 33, 68, -1, 68, 32, 68, -1, 68, 34, 68,
1287 -1, 68, 35, 68, -1, 68, 36, 68, -1, 68,
1288 39, 68, 40, 68, -1, 37, 68, -1, 42, 65,
1289 43, -1, 44, 68, 45, -1, 70, -1, 3, -1,
1290 32, 3, -1, 13, -1, 14, 69, -1
1295 const unsigned short int
1296 HolidayParserPlan::yyprhs_[] =
1298 0, 0, 3, 6, 11, 12, 15, 16, 19, 20,
1299 23, 24, 27, 28, 36, 37, 39, 40, 42, 43,
1300 45, 47, 48, 50, 54, 58, 63, 67, 72, 79,
1301 85, 86, 89, 92, 93, 98, 99, 101, 105, 106,
1302 109, 113, 118, 124, 128, 134, 137, 141, 144, 148,
1303 153, 155, 157, 159, 161, 165, 170, 174, 177, 180,
1304 184, 189, 191, 193, 195, 197, 201, 205, 209, 213,
1305 217, 221, 225, 229, 233, 237, 241, 245, 249, 255,
1306 258, 262, 266, 268, 270, 273, 275
1311 HolidayParserPlan::yyrline_[] =
1313 0, 123, 123, 126, 129, 130, 133, 134, 137, 138,
1314 141, 142, 145, 146, 149, 150, 153, 154, 157, 158,
1315 161, 164, 165, 168, 169, 170, 171, 172, 173, 174,
1316 177, 178, 179, 182, 183, 186, 187, 188, 191, 192,
1317 195, 196, 197, 198, 199, 200, 201, 202, 203, 204,
1318 205, 208, 209, 210, 211, 212, 213, 214, 215, 216,
1319 217, 220, 221, 224, 227, 228, 229, 230, 231, 232,
1320 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
1321 243, 246, 247, 250, 251, 252, 253
1326 HolidayParserPlan::yystack_print_ ()
1328 *yycdebug_ <<
"Stack now";
1329 for (state_stack_type::const_iterator i = yystate_stack_.begin ();
1330 i != yystate_stack_.end (); ++i)
1331 *yycdebug_ <<
' ' << *i;
1332 *yycdebug_ << std::endl;
1337 HolidayParserPlan::yy_reduce_print_ (
int yyrule)
1339 unsigned int yylno = yyrline_[yyrule];
1340 int yynrhs = yyr2_[yyrule];
1342 *yycdebug_ <<
"Reducing stack by rule " << yyrule - 1
1343 <<
" (line " << yylno <<
"), ";
1345 for (
int yyi = 0; yyi < yynrhs; yyi++)
1346 YY_SYMBOL_PRINT (
" $" << yyi + 1 <<
" =",
1347 yyrhs_[yyprhs_[yyrule] + yyi],
1348 &(yysemantic_stack_[(yynrhs) - (yyi + 1)]),
1349 &(yylocation_stack_[(yynrhs) - (yyi + 1)]));
1354 HolidayParserPlan::token_number_type
1355 HolidayParserPlan::yytranslate_ (
int t)
1358 const token_number_type
1361 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1362 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1363 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1364 2, 2, 2, 37, 2, 2, 2, 36, 2, 2,
1365 44, 45, 34, 33, 2, 32, 41, 35, 2, 2,
1366 2, 2, 2, 2, 2, 2, 2, 2, 40, 2,
1367 2, 2, 2, 39, 2, 2, 2, 2, 2, 2,
1368 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1369 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1370 2, 42, 2, 43, 2, 2, 2, 2, 2, 2,
1371 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1372 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1373 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1374 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1375 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1376 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1377 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1378 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1379 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1380 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1381 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1382 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1383 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1384 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1385 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1386 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
1387 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
1388 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
1389 25, 26, 27, 28, 29, 30, 31, 38
1391 if ((
unsigned int) t <= yyuser_token_number_max_)
1392 return translate_table[t];
1394 return yyundef_token_;
1397 const int HolidayParserPlan::yyeof_ = 0;
1398 const int HolidayParserPlan::yylast_ = 287;
1399 const int HolidayParserPlan::yynnts_ = 25;
1400 const int HolidayParserPlan::yyempty_ = -2;
1401 const int HolidayParserPlan::yyfinal_ = 6;
1402 const int HolidayParserPlan::yyterror_ = 1;
1403 const int HolidayParserPlan::yyerrcode_ = 256;
1404 const int HolidayParserPlan::yyntokens_ = 46;
1406 const unsigned int HolidayParserPlan::yyuser_token_number_max_ = 287;
1407 const HolidayParserPlan::token_number_type HolidayParserPlan::yyundef_token_ = 2;
1411 #line 256 "holidayparserplan.ypp"
1418 driver.
error( errorLocation, errorMessage.c_str() );
void set_debug_stream(std::ostream &)
Set the current debugging stream.
Present a slice of the top of a stack.
position end
End of the located region.
void error(const KHolidays::location &errorLocation, const QString &errorMessage)
Bison C++ skeleton error message handling.
int debug_level_type
Type for debugging levels.
void set_debug_level(debug_level_type l)
Set the current debugging level.
debug_level_type debug_level() const
The current debugging level.
virtual int parse()
Parse.
HolidayParserPlan(class HolidayParserDriverPlan &driver_yyarg)
Build a parser object.
std::ostream & debug_stream() const
The current debugging stream.
position begin
Beginning of the located region.
std::string * filename
File name to which this position refers.
HolidayParserDriverPlan implementation class.