librostlab-blast
1.0.0
|
00001 00002 /* A Bison parser, made by GNU Bison 2.4.1. */ 00003 00004 /* Skeleton interface for Bison LALR(1) parsers in C++ 00005 00006 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software 00007 Foundation, Inc. 00008 00009 This program is free software: you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation, either version 3 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00021 00022 /* As a special exception, you may create a larger work that contains 00023 part or all of the Bison parser skeleton and distribute that work 00024 under terms of your choice, so long as that work isn't itself a 00025 parser generator using the skeleton or a modified version thereof 00026 as a parser skeleton. Alternatively, if you modify or redistribute 00027 the parser skeleton itself, you may (at your option) remove this 00028 special exception, which will cause the skeleton and the resulting 00029 Bison output files to be licensed under the GNU General Public 00030 License without this special exception. 00031 00032 This special exception was added by the Free Software Foundation in 00033 version 2.2 of Bison. */ 00034 00035 /* C++ LALR(1) parser skeleton written by Akim Demaille. */ 00036 00037 #ifndef PARSER_HEADER_H 00038 # define PARSER_HEADER_H 00039 00040 /* "%code requires" blocks. */ 00041 00042 /* Line 35 of lalr1.cc */ 00043 #line 24 "blast-parser-parser.ypp" 00044 00045 #include <string> 00046 #include "rostlab/blast-result.h" 00047 namespace rostlab { namespace blast { class parser_driver; } } 00048 00049 00050 00051 /* Line 35 of lalr1.cc */ 00052 #line 53 "rostlab/blast-parser-parser.h" 00053 00054 00055 #include <string> 00056 #include <iostream> 00057 #include "rostlab/blast-parser-stack.h" 00058 00059 00060 /* Line 35 of lalr1.cc */ 00061 #line 22 "blast-parser-parser.ypp" 00062 namespace rostlab { namespace blast { 00063 00064 /* Line 35 of lalr1.cc */ 00065 #line 66 "rostlab/blast-parser-parser.h" 00066 class position; 00067 class location; 00068 00069 /* Line 35 of lalr1.cc */ 00070 #line 22 "blast-parser-parser.ypp" 00071 } } // rostlab::blast 00072 00073 /* Line 35 of lalr1.cc */ 00074 #line 75 "rostlab/blast-parser-parser.h" 00075 00076 #include "rostlab/blast-parser-location.h" 00077 00078 /* Enabling traces. */ 00079 #ifndef YYDEBUG 00080 # define YYDEBUG 1 00081 #endif 00082 00083 /* Enabling verbose error messages. */ 00084 #ifdef YYERROR_VERBOSE 00085 # undef YYERROR_VERBOSE 00086 # define YYERROR_VERBOSE 1 00087 #else 00088 # define YYERROR_VERBOSE 1 00089 #endif 00090 00091 /* Enabling the token table. */ 00092 #ifndef YYTOKEN_TABLE 00093 # define YYTOKEN_TABLE 0 00094 #endif 00095 00096 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. 00097 If N is 0, then set CURRENT to the empty location which ends 00098 the previous symbol: RHS[0] (always defined). */ 00099 00100 #ifndef YYLLOC_DEFAULT 00101 # define YYLLOC_DEFAULT(Current, Rhs, N) \ 00102 do { \ 00103 if (N) \ 00104 { \ 00105 (Current).begin = (Rhs)[1].begin; \ 00106 (Current).end = (Rhs)[N].end; \ 00107 } \ 00108 else \ 00109 { \ 00110 (Current).begin = (Current).end = (Rhs)[0].end; \ 00111 } \ 00112 } while (false) 00113 #endif 00114 00115 00116 /* Line 35 of lalr1.cc */ 00117 #line 22 "blast-parser-parser.ypp" 00118 namespace rostlab { namespace blast { 00119 00120 /* Line 35 of lalr1.cc */ 00121 #line 122 "rostlab/blast-parser-parser.h" 00122 00124 class parser 00125 { 00126 public: 00128 #ifndef YYSTYPE 00129 union semantic_type 00130 { 00131 00132 /* Line 35 of lalr1.cc */ 00133 #line 47 "blast-parser-parser.ypp" 00134 00135 long int ival; 00136 double dval; 00137 std::string* sval; 00138 00139 00140 00141 /* Line 35 of lalr1.cc */ 00142 #line 143 "rostlab/blast-parser-parser.h" 00143 }; 00144 #else 00145 typedef YYSTYPE semantic_type; 00146 #endif 00147 00148 typedef location location_type; 00150 struct token 00151 { 00152 /* Tokens. */ 00153 enum yytokentype { 00154 END = 0, 00155 BLAST_VERSION = 258, 00156 REFERENCE = 259, 00157 STRING = 260, 00158 INT = 261, 00159 DBL = 262, 00160 SEARCHING = 263, 00161 NOHITS = 264, 00162 ONELINE_DESC_HEADER = 265, 00163 SEQ_FOUND_AGAIN = 266, 00164 SEQ_FOUND_NEW = 267, 00165 CONVERGED = 268, 00166 TAIL = 269, 00167 QUERYEQ = 270, 00168 DATABASECOLON = 271, 00169 RESFROMROUND = 272, 00170 SCOREEQ = 273, 00171 EXPECTEQ = 274, 00172 METHODCOLON = 275, 00173 IDENTITIESEQ = 276, 00174 POSITIVESEQ = 277, 00175 GAPSEQ = 278, 00176 STRANDEQ = 279, 00177 FRAMEEQ = 280, 00178 QUERYCOLON = 281, 00179 SBJCTCOLON = 282 00180 }; 00181 00182 }; 00184 typedef token::yytokentype token_type; 00185 00187 parser (rostlab::blast::parser_driver& drv_yyarg, void* yyscanner_yyarg); 00188 virtual ~parser (); 00189 00192 virtual int parse (); 00193 00194 #if YYDEBUG 00195 00196 std::ostream& debug_stream () const; 00198 void set_debug_stream (std::ostream &); 00199 00201 typedef int debug_level_type; 00203 debug_level_type debug_level () const; 00205 void set_debug_level (debug_level_type l); 00206 #endif 00207 00208 private: 00212 virtual void error (const location_type& loc, const std::string& msg); 00213 00217 virtual std::string yysyntax_error_ (int yystate, int tok); 00218 00219 #if YYDEBUG 00220 00221 00222 00223 00224 virtual void yy_symbol_value_print_ (int yytype, 00225 const semantic_type* yyvaluep, 00226 const location_type* yylocationp); 00231 virtual void yy_symbol_print_ (int yytype, 00232 const semantic_type* yyvaluep, 00233 const location_type* yylocationp); 00234 #endif 00235 00236 00238 typedef int state_type; 00240 typedef stack<state_type> state_stack_type; 00242 typedef stack<semantic_type> semantic_stack_type; 00244 typedef stack<location_type> location_stack_type; 00245 00247 state_stack_type yystate_stack_; 00249 semantic_stack_type yysemantic_stack_; 00251 location_stack_type yylocation_stack_; 00252 00254 typedef unsigned char token_number_type; 00255 /* Tables. */ 00257 static const signed char yypact_[]; 00258 static const signed char yypact_ninf_; 00259 00263 static const unsigned char yydefact_[]; 00264 00265 static const signed char yypgoto_[]; 00266 static const signed char yydefgoto_[]; 00267 00273 static const unsigned char yytable_[]; 00274 static const signed char yytable_ninf_; 00275 00276 static const unsigned char yycheck_[]; 00277 00279 static const unsigned char yystos_[]; 00280 00282 static const unsigned char yyr1_[]; 00284 static const unsigned char yyr2_[]; 00285 00286 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE 00287 00288 static const char* const yytname_[]; 00289 #endif 00290 00291 #if YYERROR_VERBOSE 00292 00293 virtual std::string yytnamerr_ (const char *n); 00294 #endif 00295 00296 #if YYDEBUG 00297 00298 typedef signed char rhs_number_type; 00300 static const rhs_number_type yyrhs_[]; 00302 static const unsigned char yyprhs_[]; 00304 static const unsigned char yyrline_[]; 00306 static const unsigned short int yytoken_number_[]; 00308 virtual void yy_reduce_print_ (int r); 00310 virtual void yystack_print_ (); 00311 00312 /* Debugging. */ 00313 int yydebug_; 00314 std::ostream* yycdebug_; 00315 #endif 00316 00318 token_number_type yytranslate_ (int t); 00319 00325 inline void yydestruct_ (const char* yymsg, 00326 int yytype, 00327 semantic_type* yyvaluep, 00328 location_type* yylocationp); 00329 00331 inline void yypop_ (unsigned int n = 1); 00332 00333 /* Constants. */ 00334 static const int yyeof_; 00335 /* LAST_ -- Last index in TABLE_. */ 00336 static const int yylast_; 00337 static const int yynnts_; 00338 static const int yyempty_; 00339 static const int yyfinal_; 00340 static const int yyterror_; 00341 static const int yyerrcode_; 00342 static const int yyntokens_; 00343 static const unsigned int yyuser_token_number_max_; 00344 static const token_number_type yyundef_token_; 00345 00346 /* User arguments. */ 00347 rostlab::blast::parser_driver& drv; 00348 void* yyscanner; 00349 }; 00350 00351 /* Line 35 of lalr1.cc */ 00352 #line 22 "blast-parser-parser.ypp" 00353 } } // rostlab::blast 00354 00355 /* Line 35 of lalr1.cc */ 00356 #line 357 "rostlab/blast-parser-parser.h" 00357 00358 00359 00360 #endif /* ! defined PARSER_HEADER_H */