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 3 "Parser.ypp"
00044
00045 #include <mgfp/Driver.h>
00046 #include "Nodes.h"
00047
00048 #include <cstdio>
00049 #include <string>
00050 #include <utility>
00051 #include <vector>
00052
00053 using namespace mgf;
00054 using namespace mgf::detail;
00055
00056
00057
00058
00059 #line 60 "Parser.h"
00060
00061
00062 #include <string>
00063 #include <iostream>
00064 #include "stack.h"
00065
00066
00067
00068 #line 1 "[Bison:b4_percent_define_default]"
00069
00070 namespace mgf {
00071
00072
00073 #line 74 "Parser.h"
00074 class position;
00075 class location;
00076
00077
00078 #line 1 "[Bison:b4_percent_define_default]"
00079
00080 }
00081
00082
00083 #line 84 "Parser.h"
00084
00085 #include "location.h"
00086
00087
00088 #ifndef YYDEBUG
00089 # define YYDEBUG 1
00090 #endif
00091
00092
00093 #ifdef YYERROR_VERBOSE
00094 # undef YYERROR_VERBOSE
00095 # define YYERROR_VERBOSE 1
00096 #else
00097 # define YYERROR_VERBOSE 1
00098 #endif
00099
00100
00101 #ifndef YYTOKEN_TABLE
00102 # define YYTOKEN_TABLE 0
00103 #endif
00104
00105
00106
00107
00108
00109 #ifndef YYLLOC_DEFAULT
00110 # define YYLLOC_DEFAULT(Current, Rhs, N) \
00111 do { \
00112 if (N) \
00113 { \
00114 (Current).begin = (Rhs)[1].begin; \
00115 (Current).end = (Rhs)[N].end; \
00116 } \
00117 else \
00118 { \
00119 (Current).begin = (Current).end = (Rhs)[0].end; \
00120 } \
00121 } while (false)
00122 #endif
00123
00124
00125
00126 #line 1 "[Bison:b4_percent_define_default]"
00127
00128 namespace mgf {
00129
00130
00131 #line 132 "Parser.h"
00132
00134 class Parser
00135 {
00136 public:
00138 #ifndef YYSTYPE
00139 union semantic_type
00140 {
00141
00142
00143 #line 53 "Parser.ypp"
00144
00145 int integerVal;
00146 double doubleVal;
00147 std::string* stringVal;
00148 DoublePairNode* doublepairnode;
00149 DoublePairListNode* doublepairlistnode;
00150 IntegerNode* integernode;
00151 IntegerListNode* integerlistnode;
00152
00153
00154
00155
00156 #line 157 "Parser.h"
00157 };
00158 #else
00159 typedef YYSTYPE semantic_type;
00160 #endif
00162 typedef location location_type;
00164 struct token
00165 {
00166
00167 enum yytokentype {
00168 END = 0,
00169 EOL = 258,
00170 COMMENT = 259,
00171 AND = 260,
00172 INTEGER = 261,
00173 DOUBLE = 262,
00174 STRING = 263,
00175 BEGIN_IONS = 264,
00176 CHARGE = 265,
00177 COMP = 266,
00178 END_IONS = 267,
00179 ETAG = 268,
00180 INSTRUMENT = 269,
00181 IT_MODS = 270,
00182 PEPMASS = 271,
00183 RTINSECONDS = 272,
00184 SCANS = 273,
00185 SEQ = 274,
00186 TAG = 275,
00187 TITLE = 276,
00188 TOL = 277,
00189 TOLU = 278,
00190 CLE = 279,
00191 COM = 280,
00192 DB = 281,
00193 FORMAT = 282,
00194 ITOLU = 283,
00195 MASS = 284,
00196 MODS = 285,
00197 QUANTITATION = 286,
00198 REPORT = 287,
00199 REPTYPE = 288,
00200 SEARCH = 289,
00201 TAXONOMY = 290,
00202 USER = 291,
00203 USEREMAIL = 292,
00204 USERNAME = 293,
00205 DECOY = 294,
00206 ERRORTOLERANT = 295,
00207 ITOL = 296,
00208 PEP_ISOTOPE_ERROR = 297,
00209 PFA = 298,
00210 PRECURSOR = 299,
00211 SEG = 300,
00212 FRAMES = 301
00213 };
00214
00215 };
00217 typedef token::yytokentype token_type;
00218
00220 Parser (Driver& driver_yyarg);
00221 virtual ~Parser ();
00222
00225 virtual int parse ();
00226
00227 #if YYDEBUG
00229 std::ostream& debug_stream () const;
00231 void set_debug_stream (std::ostream &);
00232
00234 typedef int debug_level_type;
00236 debug_level_type debug_level () const;
00238 void set_debug_level (debug_level_type l);
00239 #endif
00240
00241 private:
00245 virtual void error (const location_type& loc, const std::string& msg);
00246
00250 virtual std::string yysyntax_error_ (int yystate, int tok);
00251
00252 #if YYDEBUG
00257 virtual void yy_symbol_value_print_ (int yytype,
00258 const semantic_type* yyvaluep,
00259 const location_type* yylocationp);
00264 virtual void yy_symbol_print_ (int yytype,
00265 const semantic_type* yyvaluep,
00266 const location_type* yylocationp);
00267 #endif
00268
00269
00271 typedef int state_type;
00273 typedef stack<state_type> state_stack_type;
00275 typedef stack<semantic_type> semantic_stack_type;
00277 typedef stack<location_type> location_stack_type;
00278
00280 state_stack_type yystate_stack_;
00282 semantic_stack_type yysemantic_stack_;
00284 location_stack_type yylocation_stack_;
00285
00287 typedef unsigned char token_number_type;
00288
00290 static const short int yypact_[];
00291 static const signed char yypact_ninf_;
00292
00296 static const unsigned char yydefact_[];
00297
00298 static const signed char yypgoto_[];
00299 static const short int yydefgoto_[];
00300
00306 static const unsigned char yytable_[];
00307 static const signed char yytable_ninf_;
00308
00309 static const short int yycheck_[];
00310
00312 static const unsigned char yystos_[];
00313
00315 static const unsigned char yyr1_[];
00317 static const unsigned char yyr2_[];
00318
00319 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00321 static const char* const yytname_[];
00322 #endif
00323
00324 #if YYERROR_VERBOSE
00326 virtual std::string yytnamerr_ (const char *n);
00327 #endif
00328
00329 #if YYDEBUG
00331 typedef signed char rhs_number_type;
00333 static const rhs_number_type yyrhs_[];
00335 static const unsigned short int yyprhs_[];
00337 static const unsigned char yyrline_[];
00339 static const unsigned short int yytoken_number_[];
00341 virtual void yy_reduce_print_ (int r);
00343 virtual void yystack_print_ ();
00344
00345
00346 int yydebug_;
00347 std::ostream* yycdebug_;
00348 #endif
00349
00351 token_number_type yytranslate_ (int t);
00352
00358 inline void yydestruct_ (const char* yymsg,
00359 int yytype,
00360 semantic_type* yyvaluep,
00361 location_type* yylocationp);
00362
00364 inline void yypop_ (unsigned int n = 1);
00365
00366
00367 static const int yyeof_;
00368
00369 static const int yylast_;
00370 static const int yynnts_;
00371 static const int yyempty_;
00372 static const int yyfinal_;
00373 static const int yyterror_;
00374 static const int yyerrcode_;
00375 static const int yyntokens_;
00376 static const unsigned int yyuser_token_number_max_;
00377 static const token_number_type yyundef_token_;
00378
00379
00380 Driver& driver;
00381 };
00382
00383
00384 #line 1 "[Bison:b4_percent_define_default]"
00385
00386 }
00387
00388
00389 #line 390 "Parser.h"
00390
00391
00392
00393 #endif