"L. Spiro Engine"
|
00001 /* A Bison parser, made by GNU Bison 2.4.2. */ 00002 00003 /* Skeleton interface for Bison LALR(1) parsers in C++ 00004 00005 Copyright (C) 2002-2010 Free Software Foundation, Inc. 00006 00007 This program is free software: you can redistribute it and/or modify 00008 it under the terms of the GNU General Public License as published by 00009 the Free Software Foundation, either version 3 of the License, or 00010 (at your option) any later version. 00011 00012 This program is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 GNU General Public License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00019 00020 /* As a special exception, you may create a larger work that contains 00021 part or all of the Bison parser skeleton and distribute that work 00022 under terms of your choice, so long as that work isn't itself a 00023 parser generator using the skeleton or a modified version thereof 00024 as a parser skeleton. Alternatively, if you modify or redistribute 00025 the parser skeleton itself, you may (at your option) remove this 00026 special exception, which will cause the skeleton and the resulting 00027 Bison output files to be licensed under the GNU General Public 00028 License without this special exception. 00029 00030 This special exception was added by the Free Software Foundation in 00031 version 2.2 of Bison. */ 00032 00033 /* C++ LALR(1) parser skeleton written by Akim Demaille. */ 00034 00035 #ifndef PARSER_HEADER_H 00036 # define PARSER_HEADER_H 00037 00038 00039 00040 #include <string> 00041 #include <iostream> 00042 #include "stack.hh" 00043 00044 00045 namespace yy { 00046 00047 class position; 00048 class location; 00049 00050 } // yy 00051 00052 00053 #include "location.hh" 00054 00055 /* Enabling traces. */ 00056 #ifndef YYDEBUG 00057 # define YYDEBUG 0 00058 #endif 00059 00060 /* Enabling verbose error messages. */ 00061 #ifdef YYERROR_VERBOSE 00062 # undef YYERROR_VERBOSE 00063 # define YYERROR_VERBOSE 1 00064 #else 00065 # define YYERROR_VERBOSE 0 00066 #endif 00067 00068 /* Enabling the token table. */ 00069 #ifndef YYTOKEN_TABLE 00070 # define YYTOKEN_TABLE 0 00071 #endif 00072 00073 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 00074 If N is 0, then set CURRENT to the empty location which ends 00075 the previous symbol: RHS[0] (always defined). */ 00076 00077 #ifndef YYLLOC_DEFAULT 00078 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 00079 do { \ 00080 if (N) \ 00081 { \ 00082 (Current).begin = (Rhs)[1].begin; \ 00083 (Current).end = (Rhs)[N].end; \ 00084 } \ 00085 else \ 00086 { \ 00087 (Current).begin = (Current).end = (Rhs)[0].end; \ 00088 } \ 00089 } while (false) 00090 #endif 00091 00092 00093 namespace yy { 00094 00095 00097 class parser 00098 { 00099 public: 00101 #ifndef YYSTYPE 00102 typedef YYSTYPE semantic_type; 00103 #else 00104 typedef YYSTYPE semantic_type; 00105 #endif 00106 00107 typedef location location_type; 00109 struct token 00110 { 00111 /* Tokens. */ 00112 enum yytokentype { 00113 LSG_PPT_DEFINED = 258, 00114 LSG_PPT_CHAR_CONSTANT = 259, 00115 LSG_PPT_FLOAT_CONSTANT = 260, 00116 LSG_PPT_DEC_CONSTANT = 261, 00117 LSG_PPT_HEX_CONSTANT = 262, 00118 LSG_PPT_OCT_CONSTANT = 263, 00119 LSG_PPT_IDENTIFIER = 264, 00120 LSG_PPT_SHIFT_LEFT = 265, 00121 LSG_PPT_SHIFT_RIGHT = 266, 00122 LSG_PPT_AND = 267, 00123 LSG_PPT_OR = 268, 00124 LSG_PPT_GE = 269, 00125 LSG_PPT_LE = 270, 00126 LSG_PPT_EQUALS = 271, 00127 LSG_PPT_NOT_EQUALS = 272, 00128 LSG_PPT_NOT = 273, 00129 LSG_PPT_1SCOMPLIMENT = 274, 00130 LSG_PPT_UMINUS = 275, 00131 LSG_PPT_UPLUS = 276 00132 }; 00133 00134 }; 00136 typedef token::yytokentype token_type; 00137 00139 parser (class CPreProcLexer * m_ppplLexer_yyarg, class CPreProcContainer * m_pppcContainer_yyarg); 00140 virtual ~parser (); 00141 00144 virtual int parse (); 00145 00146 #if YYDEBUG 00147 00148 std::ostream& debug_stream () const; 00150 void set_debug_stream (std::ostream &); 00151 00153 typedef int debug_level_type; 00155 debug_level_type debug_level () const; 00157 void set_debug_level (debug_level_type l); 00158 #endif 00159 00160 private: 00164 virtual void error (const location_type& loc, const std::string& msg); 00165 00169 virtual std::string yysyntax_error_ (int yystate); 00170 00171 #if YYDEBUG 00172 00173 00174 00175 00176 virtual void yy_symbol_value_print_ (int yytype, 00177 const semantic_type* yyvaluep, 00178 const location_type* yylocationp); 00183 virtual void yy_symbol_print_ (int yytype, 00184 const semantic_type* yyvaluep, 00185 const location_type* yylocationp); 00186 #endif 00187 00188 00190 typedef int state_type; 00192 typedef stack<state_type> state_stack_type; 00194 typedef stack<semantic_type> semantic_stack_type; 00196 typedef stack<location_type> location_stack_type; 00197 00199 state_stack_type yystate_stack_; 00201 semantic_stack_type yysemantic_stack_; 00203 location_stack_type yylocation_stack_; 00204 00206 typedef unsigned char token_number_type; 00207 /* Tables. */ 00209 static const signed char yypact_[]; 00210 static const signed char yypact_ninf_; 00211 00215 static const unsigned char yydefact_[]; 00216 00217 static const signed char yypgoto_[]; 00218 static const signed char yydefgoto_[]; 00219 00225 static const unsigned char yytable_[]; 00226 static const signed char yytable_ninf_; 00227 00228 static const signed char yycheck_[]; 00229 00231 static const unsigned char yystos_[]; 00232 00234 static const unsigned char yyr1_[]; 00236 static const unsigned char yyr2_[]; 00237 00238 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00239 00240 static const char* const yytname_[]; 00241 #endif 00242 00243 #if YYERROR_VERBOSE 00244 00245 virtual std::string yytnamerr_ (const char *n); 00246 #endif 00247 00248 #if YYDEBUG 00249 00250 typedef signed char rhs_number_type; 00252 static const rhs_number_type yyrhs_[]; 00254 static const unsigned char yyprhs_[]; 00256 static const unsigned char yyrline_[]; 00258 static const unsigned short int yytoken_number_[]; 00260 virtual void yy_reduce_print_ (int r); 00262 virtual void yystack_print_ (); 00263 00264 /* Debugging. */ 00265 int yydebug_; 00266 std::ostream* yycdebug_; 00267 #endif 00268 00270 token_number_type yytranslate_ (int t); 00271 00277 inline void yydestruct_ (const char* yymsg, 00278 int yytype, 00279 semantic_type* yyvaluep, 00280 location_type* yylocationp); 00281 00283 inline void yypop_ (unsigned int n = 1); 00284 00285 /* Constants. */ 00286 static const int yyeof_; 00287 /* LAST_ -- Last index in TABLE_. */ 00288 static const int yylast_; 00289 static const int yynnts_; 00290 static const int yyempty_; 00291 static const int yyfinal_; 00292 static const int yyterror_; 00293 static const int yyerrcode_; 00294 static const int yyntokens_; 00295 static const unsigned int yyuser_token_number_max_; 00296 static const token_number_type yyundef_token_; 00297 00298 /* User arguments. */ 00299 class CPreProcLexer * m_ppplLexer; 00300 class CPreProcContainer * m_pppcContainer; 00301 }; 00302 00303 } // yy 00304 00305 00306 00307 00308 #endif /* ! defined PARSER_HEADER_H */