• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

KHolidays Library

  • kholidays
  • parsers
  • plan2
holidayparserplan.hpp
1
2/* A Bison parser, made by GNU Bison 2.4.1. */
3
4/* Skeleton interface for Bison LALR(1) parsers in C++
5
6 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
7 Foundation, Inc.
8
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21
22/* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
31
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
34
35/* C++ LALR(1) parser skeleton written by Akim Demaille. */
36
37#ifndef PARSER_HEADER_H
38# define PARSER_HEADER_H
39
40
41
42#include <string>
43#include <iostream>
44#include "stack.hh"
45
46
47/* Line 35 of lalr1.cc */
48#line 1 "[Bison:b4_percent_define_default]"
49
50namespace KHolidays {
51
52/* Line 35 of lalr1.cc */
53#line 54 "holidayparserplan.hpp"
54 class position;
55 class location;
56
57/* Line 35 of lalr1.cc */
58#line 1 "[Bison:b4_percent_define_default]"
59
60} // KHolidays
61
62/* Line 35 of lalr1.cc */
63#line 64 "holidayparserplan.hpp"
64
65#include "location.hh"
66
67/* Enabling traces. */
68#ifndef YYDEBUG
69# define YYDEBUG 1
70#endif
71
72/* Enabling verbose error messages. */
73#ifdef YYERROR_VERBOSE
74# undef YYERROR_VERBOSE
75# define YYERROR_VERBOSE 1
76#else
77# define YYERROR_VERBOSE 1
78#endif
79
80/* Enabling the token table. */
81#ifndef YYTOKEN_TABLE
82# define YYTOKEN_TABLE 0
83#endif
84
85/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
86 If N is 0, then set CURRENT to the empty location which ends
87 the previous symbol: RHS[0] (always defined). */
88
89#ifndef YYLLOC_DEFAULT
90# define YYLLOC_DEFAULT(Current, Rhs, N) \
91do { \
92 if (N) \
93 { \
94 (Current).begin = (Rhs)[1].begin; \
95 (Current).end = (Rhs)[N].end; \
96 } \
97 else \
98 { \
99 (Current).begin = (Current).end = (Rhs)[0].end; \
100 } \
101} while (false)
102#endif
103
104
105/* Line 35 of lalr1.cc */
106#line 1 "[Bison:b4_percent_define_default]"
107
108namespace KHolidays {
109
110/* Line 35 of lalr1.cc */
111#line 112 "holidayparserplan.hpp"
112
114 class HolidayParserPlan
115 {
116 public:
118#ifndef YYSTYPE
119 union semantic_type
120 {
121
122/* Line 35 of lalr1.cc */
123#line 86 "holidayparserplan.ypp"
124 int ival; char *sval;
125
126
127/* Line 35 of lalr1.cc */
128#line 129 "holidayparserplan.hpp"
129 };
130#else
131 typedef YYSTYPE semantic_type;
132#endif
134 typedef location location_type;
136 struct token
137 {
138 /* Tokens. */
139 enum yytokentype {
140 END = 0,
141 NUMBER = 258,
142 MONTH = 259,
143 WDAY = 260,
144 STRING = 261,
145 CATEGORY = 262,
146 CALENDAR = 263,
147 INOP = 264,
148 PLUS = 265,
149 MINUS = 266,
150 YEAR = 267,
151 LEAPYEAR = 268,
152 SHIFT = 269,
153 IF = 270,
154 LENGTH = 271,
155 EASTER = 272,
156 EQ = 273,
157 NE = 274,
158 LE = 275,
159 GE = 276,
160 LT = 277,
161 GT = 278,
162 PASCHA = 279,
163 COUNTRY = 280,
164 LANGUAGE = 281,
165 NAME = 282,
166 DESCRIPTION = 283,
167 OR = 284,
168 AND = 285,
169 UMINUS = 286
170 };
171
172 };
174 typedef token::yytokentype token_type;
175
177 HolidayParserPlan (class HolidayParserDriverPlan& driver_yyarg);
178 virtual ~HolidayParserPlan ();
179
182 virtual int parse ();
183
184#if YYDEBUG
186 std::ostream& debug_stream () const;
188 void set_debug_stream (std::ostream &);
189
191 typedef int debug_level_type;
193 debug_level_type debug_level () const;
195 void set_debug_level (debug_level_type l);
196#endif
197
198 private:
202 virtual void error (const location_type& loc, const std::string& msg);
203
207 virtual std::string yysyntax_error_ (int yystate, int tok);
208
209#if YYDEBUG
214 virtual void yy_symbol_value_print_ (int yytype,
215 const semantic_type* yyvaluep,
216 const location_type* yylocationp);
221 virtual void yy_symbol_print_ (int yytype,
222 const semantic_type* yyvaluep,
223 const location_type* yylocationp);
224#endif
225
226
228 typedef int state_type;
230 typedef stack<state_type> state_stack_type;
232 typedef stack<semantic_type> semantic_stack_type;
234 typedef stack<location_type> location_stack_type;
235
237 state_stack_type yystate_stack_;
239 semantic_stack_type yysemantic_stack_;
241 location_stack_type yylocation_stack_;
242
244 typedef unsigned char token_number_type;
245 /* Tables. */
247 static const short int yypact_[];
248 static const signed char yypact_ninf_;
249
253 static const unsigned char yydefact_[];
254
255 static const signed char yypgoto_[];
256 static const signed char yydefgoto_[];
257
263 static const short int yytable_[];
264 static const signed char yytable_ninf_;
265
266 static const short int yycheck_[];
267
269 static const unsigned char yystos_[];
270
272 static const unsigned char yyr1_[];
274 static const unsigned char yyr2_[];
275
276#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
278 static const char* const yytname_[];
279#endif
280
281#if YYERROR_VERBOSE
283 virtual std::string yytnamerr_ (const char *n);
284#endif
285
286#if YYDEBUG
288 typedef signed char rhs_number_type;
290 static const rhs_number_type yyrhs_[];
292 static const unsigned short int yyprhs_[];
294 static const unsigned char yyrline_[];
296 static const unsigned short int yytoken_number_[];
298 virtual void yy_reduce_print_ (int r);
300 virtual void yystack_print_ ();
301
302 /* Debugging. */
303 int yydebug_;
304 std::ostream* yycdebug_;
305#endif
306
308 token_number_type yytranslate_ (int t);
309
315 inline void yydestruct_ (const char* yymsg,
316 int yytype,
317 semantic_type* yyvaluep,
318 location_type* yylocationp);
319
321 inline void yypop_ (unsigned int n = 1);
322
323 /* Constants. */
324 static const int yyeof_;
325 /* LAST_ -- Last index in TABLE_. */
326 static const int yylast_;
327 static const int yynnts_;
328 static const int yyempty_;
329 static const int yyfinal_;
330 static const int yyterror_;
331 static const int yyerrcode_;
332 static const int yyntokens_;
333 static const unsigned int yyuser_token_number_max_;
334 static const token_number_type yyundef_token_;
335
336 /* User arguments. */
337 class HolidayParserDriverPlan& driver;
338 };
339
340/* Line 35 of lalr1.cc */
341#line 1 "[Bison:b4_percent_define_default]"
342
343} // KHolidays
344
345/* Line 35 of lalr1.cc */
346#line 347 "holidayparserplan.hpp"
347
348
349
350#endif /* ! defined PARSER_HEADER_H */
KHolidays::HolidayParserDriverPlan
HolidayParserDriverPlan implementation class.
Definition holidayparserdriverplan_p.h:54
KHolidays::HolidayParserPlan
A Bison parser.
Definition holidayparserplan.hpp:115
KHolidays::HolidayParserPlan::token_type
token::yytokentype token_type
Token type.
Definition holidayparserplan.hpp:174
KHolidays::HolidayParserPlan::parse
virtual int parse()
Parse.
Definition holidayparserplan.cpp:302
KHolidays::HolidayParserPlan::HolidayParserPlan
HolidayParserPlan(class HolidayParserDriverPlan &driver_yyarg)
Build a parser object.
Definition holidayparserplan.cpp:194
KHolidays::HolidayParserPlan::location_type
location location_type
Symbol locations.
Definition holidayparserplan.hpp:134
KHolidays::location
Abstract a location.
Definition location.hh:57
location.hh
Define the KHolidays::location class.
KHolidays::HolidayParserPlan::token
Tokens.
Definition holidayparserplan.hpp:137
KHolidays::HolidayParserPlan::semantic_type
Symbol semantic values.
Definition holidayparserplan.hpp:120
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHolidays Library

Skip menu "KHolidays Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal