holidayscannerplan_p.h
00001 /* 00002 This file is part of the kholidays library. 00003 00004 Copyright 2010 John Layt <john@layt.net> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to the 00018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KHOLIDAYS_HOLIDAYSCANNERPLAN_P_H 00023 #define KHOLIDAYS_HOLIDAYSCANNERPLAN_P_H 00024 00025 // Flex expects the signature of yylex to be defined in the macro YY_DECL, and 00026 // the C++ parser expects it to be declared. We can factor both as follows. 00027 00028 #ifndef YY_DECL 00029 00030 #define YY_DECL \ 00031 KHolidays::HolidayParserPlan::token_type \ 00032 KHolidays::HolidayScannerPlan::lex( \ 00033 KHolidays::HolidayParserPlan::semantic_type* yylval, \ 00034 KHolidays::HolidayParserPlan::location_type* yylloc \ 00035 ) 00036 #endif 00037 00038 #ifndef __FLEX_LEXER_H 00039 #define yyFlexLexer HolidayScannerFlexLexer 00040 #include "FlexLexer.h" 00041 #undef yyFlexLexer 00042 #endif 00043 00044 #include "holidayparserplan.hpp" 00045 00046 namespace KHolidays { 00047 00063 class HolidayScannerPlan : public HolidayScannerFlexLexer 00064 { 00065 public: 00066 HolidayScannerPlan(std::istream* arg_yyin = 0, std::ostream* arg_yyout = 0); 00067 00068 virtual ~HolidayScannerPlan(); 00069 00070 virtual HolidayParserPlan::token_type lex( HolidayParserPlan::semantic_type* yylval, 00071 HolidayParserPlan::location_type* yylloc ); 00072 00073 void set_debug(bool b); 00074 }; 00075 00076 } // namespace KHolidays 00077 00078 #endif // KHOLIDAYS_HOLIDAYSCANNERPLAN_P_H