45#ifndef YY_YY_ROSTLAB_BLAST_PARSER_PARSER_H_INCLUDED
46# define YY_YY_ROSTLAB_BLAST_PARSER_PARSER_H_INCLUDED
48#line 24 "blast-parser-parser.ypp"
52namespace rostlab {
namespace blast {
class parser_driver; } }
54#line 55 "rostlab/blast-parser-parser.h"
63#if defined __cplusplus
64# define YY_CPLUSPLUS __cplusplus
66# define YY_CPLUSPLUS 199711L
70#if 201103L <= YY_CPLUSPLUS
71# define YY_MOVE std::move
72# define YY_MOVE_OR_COPY move
73# define YY_MOVE_REF(Type) Type&&
74# define YY_RVREF(Type) Type&&
75# define YY_COPY(Type) Type
78# define YY_MOVE_OR_COPY copy
79# define YY_MOVE_REF(Type) Type&
80# define YY_RVREF(Type) const Type&
81# define YY_COPY(Type) const Type&
85#if 201103L <= YY_CPLUSPLUS
86# define YY_NOEXCEPT noexcept
90# define YY_NOTHROW throw ()
94#if 201703 <= YY_CPLUSPLUS
95# define YY_CONSTEXPR constexpr
102#ifndef YY_ATTRIBUTE_PURE
103# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
104# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
106# define YY_ATTRIBUTE_PURE
110#ifndef YY_ATTRIBUTE_UNUSED
111# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
112# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
114# define YY_ATTRIBUTE_UNUSED
119#if ! defined lint || defined __GNUC__
120# define YY_USE(E) ((void) (E))
126#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
127# if __GNUC__ * 100 + __GNUC_MINOR__ < 407
128# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
129 _Pragma ("GCC diagnostic push") \
130 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
132# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
133 _Pragma ("GCC diagnostic push") \
134 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
135 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
137# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
138 _Pragma ("GCC diagnostic pop")
140# define YY_INITIAL_VALUE(Value) Value
142#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
143# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
144# define YY_IGNORE_MAYBE_UNINITIALIZED_END
146#ifndef YY_INITIAL_VALUE
147# define YY_INITIAL_VALUE(Value)
150#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
151# define YY_IGNORE_USELESS_CAST_BEGIN \
152 _Pragma ("GCC diagnostic push") \
153 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
154# define YY_IGNORE_USELESS_CAST_END \
155 _Pragma ("GCC diagnostic pop")
157#ifndef YY_IGNORE_USELESS_CAST_BEGIN
158# define YY_IGNORE_USELESS_CAST_BEGIN
159# define YY_IGNORE_USELESS_CAST_END
164# define YY_CAST(Type, Val) static_cast<Type> (Val)
165# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
167# define YY_CAST(Type, Val) ((Type) (Val))
168# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
172# if defined __cplusplus
173# if 201103L <= __cplusplus
174# define YY_NULLPTR nullptr
179# define YY_NULLPTR ((void*)0)
188#line 22 "blast-parser-parser.ypp"
189namespace rostlab {
namespace blast {
190#line 191 "rostlab/blast-parser-parser.h"
201# pragma GCC message "bison: do not #define YYSTYPE in C++, use %define api.value.type"
208#line 47 "blast-parser-parser.ypp"
214#line 215 "rostlab/blast-parser-parser.h"
228 : std::runtime_error (m)
233 : std::runtime_error (s.what ())
258 ONELINE_DESC_HEADER = 265,
259 SEQ_FOUND_AGAIN = 266,
304 S_ONELINE_DESC_HEADER = 10,
305 S_SEQ_FOUND_AGAIN = 11,
306 S_SEQ_FOUND_NEW = 12,
310 S_DATABASECOLON = 16,
337 S_oneline_descs = 43,
344 S_hsp_headerfields = 50,
345 S_hsp_headerfield = 51,
364 template <
typename Base>
376#if 201103L <= YY_CPLUSPLUS
379 : Base (std::move (that))
380 , value (std::move (that.value))
413 return parser::symbol_name (this->kind ());
432#if YY_CPLUSPLUS < 201103L
447#if 201103L <= YY_CPLUSPLUS
489#if 201103L <= YY_CPLUSPLUS
508 void set_debug_stream (std::ostream &);
551#if YY_CPLUSPLUS < 201103L
560 typedef signed char state_type;
563 int yy_syntax_error_arguments_ (
const context& yyctx,
568 virtual std::string yysyntax_error_ (
const context& yyctx)
const;
572 static state_type yy_lr_goto_state_ (state_type yystate,
int yysym);
576 static bool yy_pact_value_is_default_ (
int yyvalue)
YY_NOEXCEPT;
580 static bool yy_table_value_is_error_ (
int yyvalue)
YY_NOEXCEPT;
582 static const signed char yypact_ninf_;
583 static const signed char yytable_ninf_;
591 static std::string yytnamerr_ (
const char *yystr);
594 static const char*
const yytname_[];
600 static const signed char yypact_[];
605 static const signed char yydefact_[];
608 static const signed char yypgoto_[];
611 static const signed char yydefgoto_[];
616 static const signed char yytable_[];
618 static const signed char yycheck_[];
622 static const signed char yystos_[];
625 static const signed char yyr1_[];
628 static const signed char yyr2_[];
633 static const unsigned char yyrline_[];
635 virtual void yy_reduce_print_ (
int r)
const;
637 virtual void yy_stack_print_ ()
const;
642 std::ostream* yycdebug_;
647 template <
typename Base>
655 template <
typename Base>
666 typedef state_type kind_type;
678 void move (by_state& that);
686 enum { empty_state = 0 };
694 struct stack_symbol_type : basic_symbol<by_state>
697 typedef basic_symbol<by_state> super_type;
699 stack_symbol_type ();
701 stack_symbol_type (
YY_RVREF (stack_symbol_type) that);
703 stack_symbol_type (state_type s,
YY_MOVE_REF (symbol_type) sym);
704#if YY_CPLUSPLUS < 201103L
707 stack_symbol_type& operator= (stack_symbol_type& that);
711 stack_symbol_type& operator= (
const stack_symbol_type& that);
716 template <
typename T,
typename S = std::vector<T> >
721 typedef typename S::iterator iterator;
722 typedef typename S::const_iterator const_iterator;
723 typedef typename S::size_type size_type;
724 typedef typename std::ptrdiff_t index_type;
730#if 201103L <= YY_CPLUSPLUS
732 stack (
const stack&) =
delete;
734 stack& operator= (
const stack&) =
delete;
741 operator[] (index_type i)
const
743 return seq_[size_type (size () - 1 - i)];
750 operator[] (index_type i)
752 return seq_[size_type (size () - 1 - i)];
761 seq_.push_back (T ());
762 operator[] (0).move (t);
784 return index_type (seq_.size ());
791 return seq_.begin ();
811 operator[] (index_type i)
const
813 return stack_[range_ - i];
822#if YY_CPLUSPLUS < 201103L
824 stack (
const stack&);
826 stack& operator= (
const stack&);
834 typedef stack<stack_symbol_type> stack_type;
844 void yypush_ (
const char* m,
YY_MOVE_REF (stack_symbol_type) sym);
852 void yypush_ (
const char* m, state_type s,
YY_MOVE_REF (symbol_type) sym);
873#line 22 "blast-parser-parser.ypp"
875#line 876 "rostlab/blast-parser-parser.h"
#define YY_MOVE_REF(Type)
#define YY_ATTRIBUTE_PURE
Two points in a source file.
location(const position &b, const position &e)
Construct a location from b to e.
context(const parser &yyparser, const symbol_type &yyla)
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
const symbol_type & lookahead() const YY_NOEXCEPT
const location_type & location() const YY_NOEXCEPT
symbol_kind_type token() const YY_NOEXCEPT
Present a slice of the top of a stack.
slice(const stack &stack, index_type range) YY_NOEXCEPT
Blast (default, -m 0) output parser.
void error(const syntax_error &err)
Report a syntax error.
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
parser(rostlab::blast::parser_driver &drv_yyarg, void *yyscanner_yyarg)
Build a parser object.
int debug_level_type
Type for debugging levels.
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
virtual void error(const location_type &loc, const std::string &msg)
location location_type
Symbol locations.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
static std::string symbol_name(symbol_kind_type yysymbol)
static const symbol_kind_type YYNTOKENS
The number of tokens.
value_type semantic_type
Backward compatibility (Bison 3.8).
basic_symbol(typename Base::kind_type t, YY_MOVE_REF(location_type) l)
Constructor for valueless symbols.
std::string name() const YY_NOEXCEPT
The user-facing name of this symbol.
symbol_kind_type type_get() const YY_NOEXCEPT
Backward compatibility (Bison 3.6).
basic_symbol(typename Base::kind_type t, YY_RVREF(value_type) v, YY_RVREF(location_type) l)
Constructor for symbols with semantic value.
Base super_type
Alias to Base.
basic_symbol(const basic_symbol &that)
Copy constructor.
basic_symbol() YY_NOEXCEPT
Default constructor.
~basic_symbol()
Destroy the symbol.
void clear() YY_NOEXCEPT
Destroy contents, and record that is empty.
Type access provider for token (enum) based symbols.
void clear() YY_NOEXCEPT
Record that this symbol is empty.
token_kind_type kind_type
The symbol kind as needed by the constructor.
by_kind() YY_NOEXCEPT
Default constructor.
by_kind(const by_kind &that) YY_NOEXCEPT
Copy constructor.
by_kind(kind_type t) YY_NOEXCEPT
Constructor from (external) token numbers.
@ YYNTOKENS
Number of tokens.
"External" symbols: returned by the scanner.
Syntax errors thrown from user actions.
syntax_error(const syntax_error &s)
~syntax_error() YY_NOEXCEPT YY_NOTHROW
syntax_error(const location_type &l, const std::string &m)
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).