00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef PARSER_HEADER_H
00038 # define PARSER_HEADER_H
00039
00040
00041
00042
00043 #line 71 "parser.yy"
00044
00045 #include <vector>
00046 #include <utility>
00047
00048 #include "rational.hh"
00049 #include "field.hh"
00050 #include "constraint.hh"
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 class driver;
00063
00064
00065
00066
00067 #line 68 "parser.hh"
00068
00069
00070 #include <string>
00071 #include <iostream>
00072 #include "stack.hh"
00073
00074
00075
00076 #line 1 "[Bison:b4_percent_define_default]"
00077
00078 namespace yy {
00079
00080
00081 #line 82 "parser.hh"
00082 class position;
00083 class location;
00084
00085
00086 #line 1 "[Bison:b4_percent_define_default]"
00087
00088 }
00089
00090
00091 #line 92 "parser.hh"
00092
00093 #include "location.hh"
00094
00095
00096 #ifndef YYDEBUG
00097 # define YYDEBUG 1
00098 #endif
00099
00100
00101 #ifdef YYERROR_VERBOSE
00102 # undef YYERROR_VERBOSE
00103 # define YYERROR_VERBOSE 1
00104 #else
00105 # define YYERROR_VERBOSE 1
00106 #endif
00107
00108
00109 #ifndef YYTOKEN_TABLE
00110 # define YYTOKEN_TABLE 0
00111 #endif
00112
00113
00114
00115
00116
00117 #ifndef YYLLOC_DEFAULT
00118 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00119 do { \
00120 if (N) \
00121 { \
00122 (Current).begin = (Rhs)[1].begin; \
00123 (Current).end = (Rhs)[N].end; \
00124 } \
00125 else \
00126 { \
00127 (Current).begin = (Current).end = (Rhs)[0].end; \
00128 } \
00129 } while (false)
00130 #endif
00131
00132
00133
00134 #line 1 "[Bison:b4_percent_define_default]"
00135
00136 namespace yy {
00137
00138
00139 #line 140 "parser.hh"
00140
00141
00142 class parser
00143 {
00144 public:
00145
00146 #ifndef YYSTYPE
00147 union semantic_type
00148 {
00149
00150
00151 #line 111 "parser.yy"
00152
00153 std::string *s;
00154 std::vector<std::string> *sl;
00155 constraint *c;
00156 std::vector<constraint> *cl;
00157 field *f;
00158 std::vector<field> *fl;
00159 rational *r;
00160 std::vector<rational> *rl;
00161 int i;
00162
00163
00164
00165
00166 #line 167 "parser.hh"
00167 };
00168 #else
00169 typedef YYSTYPE semantic_type;
00170 #endif
00171
00172 typedef location location_type;
00173
00174 struct token
00175 {
00176
00177 enum yytokentype {
00178 END = 0,
00179 WORD = 258,
00180 QSTR = 259,
00181 INT = 260
00182 };
00183
00184 };
00185
00186 typedef token::yytokentype token_type;
00187
00188
00189 parser (driver& theDriver_yyarg);
00190 virtual ~parser ();
00191
00192
00193
00194 virtual int parse ();
00195
00196 #if YYDEBUG
00197
00198 std::ostream& debug_stream () const;
00199
00200 void set_debug_stream (std::ostream &);
00201
00202
00203 typedef int debug_level_type;
00204
00205 debug_level_type debug_level () const;
00206
00207 void set_debug_level (debug_level_type l);
00208 #endif
00209
00210 private:
00211
00212
00213
00214 virtual void error (const location_type& loc, const std::string& msg);
00215
00216
00217
00218
00219 virtual std::string yysyntax_error_ (int yystate, int tok);
00220
00221 #if YYDEBUG
00222
00223
00224
00225
00226 virtual void yy_symbol_value_print_ (int yytype,
00227 const semantic_type* yyvaluep,
00228 const location_type* yylocationp);
00229
00230
00231
00232
00233 virtual void yy_symbol_print_ (int yytype,
00234 const semantic_type* yyvaluep,
00235 const location_type* yylocationp);
00236 #endif
00237
00238
00239
00240 typedef int state_type;
00241
00242 typedef stack<state_type> state_stack_type;
00243
00244 typedef stack<semantic_type> semantic_stack_type;
00245
00246 typedef stack<location_type> location_stack_type;
00247
00248
00249 state_stack_type yystate_stack_;
00250
00251 semantic_stack_type yysemantic_stack_;
00252
00253 location_stack_type yylocation_stack_;
00254
00255
00256 typedef unsigned char token_number_type;
00257
00258
00259 static const signed char yypact_[];
00260 static const signed char yypact_ninf_;
00261
00262
00263
00264
00265 static const unsigned char yydefact_[];
00266
00267 static const signed char yypgoto_[];
00268 static const signed char yydefgoto_[];
00269
00270
00271
00272
00273
00274
00275 static const unsigned char yytable_[];
00276 static const signed char yytable_ninf_;
00277
00278 static const signed char yycheck_[];
00279
00280
00281 static const unsigned char yystos_[];
00282
00283
00284 static const unsigned char yyr1_[];
00285
00286 static const unsigned char yyr2_[];
00287
00288 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00289
00290 static const char* const yytname_[];
00291 #endif
00292
00293 #if YYERROR_VERBOSE
00294
00295 virtual std::string yytnamerr_ (const char *n);
00296 #endif
00297
00298 #if YYDEBUG
00299
00300 typedef signed char rhs_number_type;
00301
00302 static const rhs_number_type yyrhs_[];
00303
00304 static const unsigned char yyprhs_[];
00305
00306 static const unsigned short int yyrline_[];
00307
00308 static const unsigned short int yytoken_number_[];
00309
00310 virtual void yy_reduce_print_ (int r);
00311
00312 virtual void yystack_print_ ();
00313
00314
00315 int yydebug_;
00316 std::ostream* yycdebug_;
00317 #endif
00318
00319
00320 token_number_type yytranslate_ (int t);
00321
00322
00323
00324
00325
00326
00327 inline void yydestruct_ (const char* yymsg,
00328 int yytype,
00329 semantic_type* yyvaluep,
00330 location_type* yylocationp);
00331
00332
00333 inline void yypop_ (unsigned int n = 1);
00334
00335
00336 static const int yyeof_;
00337
00338 static const int yylast_;
00339 static const int yynnts_;
00340 static const int yyempty_;
00341 static const int yyfinal_;
00342 static const int yyterror_;
00343 static const int yyerrcode_;
00344 static const int yyntokens_;
00345 static const unsigned int yyuser_token_number_max_;
00346 static const token_number_type yyundef_token_;
00347
00348
00349 driver& theDriver;
00350 };
00351
00352
00353 #line 1 "[Bison:b4_percent_define_default]"
00354
00355 }
00356
00357
00358 #line 359 "parser.hh"
00359
00360
00361
00362 #endif