// A Bison parser, made by GNU Bison 3.8.2.

// Skeleton implementation for Bison LALR(1) parsers in C++

// Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

// As a special exception, you may create a larger work that contains
// part or all of the Bison parser skeleton and distribute that work
// under terms of your choice, so long as that work isn't itself a
// parser generator using the skeleton or a modified version thereof
// as a parser skeleton.  Alternatively, if you modify or redistribute
// the parser skeleton itself, you may (at your option) remove this
// special exception, which will cause the skeleton and the resulting
// Bison output files to be licensed under the GNU General Public
// License without this special exception.

// This special exception was added by the Free Software Foundation in
// version 2.2 of Bison.

// DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
// especially those whose name start with YY_ or yy_.  They are
// private implementation details that can be changed or removed.


// Take the name prefix into account.
#define yylex   tlyylex



#include "parsetl.hh"


// Unqualified %code blocks.
#line 59 "parsetl.yy"

/* parsetl.hh and parsedecl.hh include each other recursively.
   We mut ensure that YYSTYPE is declared (by the above %union)
   before parsedecl.hh uses it. */
#include <spot/parsetl/parsedecl.hh>
using namespace spot;

#define missing_right_op_msg(op, str)		\
  error_list.emplace_back(op,			\
    "missing right operand for \"" str "\"");

#define missing_right_op(res, op, str)		\
  do						\
    {						\
      missing_right_op_msg(op, str);		\
      res = fnode::ff();		\
    }						\
  while (0);

// right is missing, so complain and use left.
#define missing_right_binop(res, left, op, str)	\
  do						\
    {						\
      missing_right_op_msg(op, str);		\
      res = left;				\
    }						\
  while (0);

// right is missing, so complain and use false.
#define missing_right_binop_hard(res, left, op, str)	\
  do							\
    {							\
      left->destroy();					\
      missing_right_op(res, op, str);			\
    }							\
  while (0);

  static bool
  sere_ensure_bool(const fnode* f, const spot::location& loc,
                   const char* oper, spot::parse_error_list& error_list)
  {
    if (f->is_boolean())
      return true;
    std::string s;
    s.reserve(80);
    s = "not a Boolean expression: in a SERE ";
    s += oper;
    s += " can only be applied to a Boolean expression";
    error_list.emplace_back(loc, s);
    return false;
  }

  static const fnode*
  error_false_block(const spot::location& loc,
                    spot::parse_error_list& error_list)
  {
    error_list.emplace_back(loc, "treating this block as false");
    return fnode::ff();
  }

  static const fnode*
  parse_ap(const std::string& str,
           const spot::location& location,
           spot::environment& env,
           spot::parse_error_list& error_list)
  {
    auto res = env.require(str);
    if (!res)
      {
        std::string s;
        s.reserve(64);
        s = "unknown atomic proposition `";
        s += str;
        s += "' in ";
        s += env.name();
        error_list.emplace_back(location, s);
      }
    return res.to_node_();
  }

  enum parser_type { parser_ltl, parser_bool, parser_sere };

  static const fnode*
  try_recursive_parse(const std::string& str,
		      const spot::location& location,
		      spot::environment& env,
		      bool debug,
		      parser_type type,
		      spot::parse_error_list& error_list)
    {
      // We want to parse a U (b U c) as two until operators applied
      // to the atomic propositions a, b, and c.  We also want to
      // parse a U (b == c) as one until operator applied to the
      // atomic propositions "a" and "b == c".  The only problem is
      // that we do not know anything about "==" or in general about
      // the syntax of atomic proposition of our users.
      //
      // To support that, the lexer will return "b U c" and "b == c"
      // as PAR_BLOCK tokens.  We then try to parse such tokens
      // recursively.  If, as in the case of "b U c", the block is
      // successfully parsed as a formula, we return this formula.
      // Otherwise, we convert the string into an atomic proposition
      // (it's up to the environment to check the syntax of this
      // proposition, and maybe reject it).

      if (str.empty())
	{
	  error_list.emplace_back(location, "unexpected empty block");
	  return nullptr;
	}

      spot::parsed_formula pf;
      switch (type)
	{
	case parser_sere:
	  pf = spot::parse_infix_sere(str, env, debug, true);
	  break;
	case parser_bool:
	  pf = spot::parse_infix_boolean(str, env, debug, true);
	  break;
	case parser_ltl:
	  pf = spot::parse_infix_psl(str, env, debug, true);
	  break;
	}

      if (pf.errors.empty())
	return pf.f.to_node_();
      return parse_ap(str, location, env, error_list);
    }


#line 180 "parsetl.cc"


#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> // FIXME: INFRINGES ON USER NAME SPACE.
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif


// Whether we are compiled with exception support.
#ifndef YY_EXCEPTIONS
# if defined __GNUC__ && !defined __EXCEPTIONS
#  define YY_EXCEPTIONS 0
# else
#  define YY_EXCEPTIONS 1
# endif
#endif

#define YYRHSLOC(Rhs, K) ((Rhs)[K].location)
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

# ifndef YYLLOC_DEFAULT
#  define YYLLOC_DEFAULT(Current, Rhs, N)                               \
    do                                                                  \
      if (N)                                                            \
        {                                                               \
          (Current).begin  = YYRHSLOC (Rhs, 1).begin;                   \
          (Current).end    = YYRHSLOC (Rhs, N).end;                     \
        }                                                               \
      else                                                              \
        {                                                               \
          (Current).begin = (Current).end = YYRHSLOC (Rhs, 0).end;      \
        }                                                               \
    while (false)
# endif


// Enable debugging if requested.
#if TLYYDEBUG

// A pseudo ostream that takes yydebug_ into account.
# define YYCDEBUG if (yydebug_) (*yycdebug_)

# define YY_SYMBOL_PRINT(Title, Symbol)         \
  do {                                          \
    if (yydebug_)                               \
    {                                           \
      *yycdebug_ << Title << ' ';               \
      yy_print_ (*yycdebug_, Symbol);           \
      *yycdebug_ << '\n';                       \
    }                                           \
  } while (false)

# define YY_REDUCE_PRINT(Rule)          \
  do {                                  \
    if (yydebug_)                       \
      yy_reduce_print_ (Rule);          \
  } while (false)

# define YY_STACK_PRINT()               \
  do {                                  \
    if (yydebug_)                       \
      yy_stack_print_ ();                \
  } while (false)

#else // !TLYYDEBUG

# define YYCDEBUG if (false) std::cerr
# define YY_SYMBOL_PRINT(Title, Symbol)  YY_USE (Symbol)
# define YY_REDUCE_PRINT(Rule)           static_cast<void> (0)
# define YY_STACK_PRINT()                static_cast<void> (0)

#endif // !TLYYDEBUG

#define yyerrok         (yyerrstatus_ = 0)
#define yyclearin       (yyla.clear ())

#define YYACCEPT        goto yyacceptlab
#define YYABORT         goto yyabortlab
#define YYERROR         goto yyerrorlab
#define YYRECOVERING()  (!!yyerrstatus_)

namespace tlyy {
#line 272 "parsetl.cc"

  /// Build a parser object.
  parser::parser (spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg)
#if TLYYDEBUG
    : yydebug_ (false),
      yycdebug_ (&std::cerr),
#else
    :
#endif
      error_list (error_list_yyarg),
      parse_environment (parse_environment_yyarg),
      result (result_yyarg)
  {}

  parser::~parser ()
  {}

  parser::syntax_error::~syntax_error () YY_NOEXCEPT YY_NOTHROW
  {}

  /*---------.
  | symbol.  |
  `---------*/

  // basic_symbol.
  template <typename Base>
  parser::basic_symbol<Base>::basic_symbol (const basic_symbol& that)
    : Base (that)
    , value (that.value)
    , location (that.location)
  {}


  /// Constructor for valueless symbols.
  template <typename Base>
  parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_MOVE_REF (location_type) l)
    : Base (t)
    , value ()
    , location (l)
  {}

  template <typename Base>
  parser::basic_symbol<Base>::basic_symbol (typename Base::kind_type t, YY_RVREF (value_type) v, YY_RVREF (location_type) l)
    : Base (t)
    , value (YY_MOVE (v))
    , location (YY_MOVE (l))
  {}


  template <typename Base>
  parser::symbol_kind_type
  parser::basic_symbol<Base>::type_get () const YY_NOEXCEPT
  {
    return this->kind ();
  }


  template <typename Base>
  bool
  parser::basic_symbol<Base>::empty () const YY_NOEXCEPT
  {
    return this->kind () == symbol_kind::S_YYEMPTY;
  }

  template <typename Base>
  void
  parser::basic_symbol<Base>::move (basic_symbol& s)
  {
    super_type::move (s);
    value = YY_MOVE (s.value);
    location = YY_MOVE (s.location);
  }

  // by_kind.
  parser::by_kind::by_kind () YY_NOEXCEPT
    : kind_ (symbol_kind::S_YYEMPTY)
  {}

#if 201103L <= YY_CPLUSPLUS
  parser::by_kind::by_kind (by_kind&& that) YY_NOEXCEPT
    : kind_ (that.kind_)
  {
    that.clear ();
  }
#endif

  parser::by_kind::by_kind (const by_kind& that) YY_NOEXCEPT
    : kind_ (that.kind_)
  {}

  parser::by_kind::by_kind (token_kind_type t) YY_NOEXCEPT
    : kind_ (yytranslate_ (t))
  {}



  void
  parser::by_kind::clear () YY_NOEXCEPT
  {
    kind_ = symbol_kind::S_YYEMPTY;
  }

  void
  parser::by_kind::move (by_kind& that)
  {
    kind_ = that.kind_;
    that.clear ();
  }

  parser::symbol_kind_type
  parser::by_kind::kind () const YY_NOEXCEPT
  {
    return kind_;
  }


  parser::symbol_kind_type
  parser::by_kind::type_get () const YY_NOEXCEPT
  {
    return this->kind ();
  }



  // by_state.
  parser::by_state::by_state () YY_NOEXCEPT
    : state (empty_state)
  {}

  parser::by_state::by_state (const by_state& that) YY_NOEXCEPT
    : state (that.state)
  {}

  void
  parser::by_state::clear () YY_NOEXCEPT
  {
    state = empty_state;
  }

  void
  parser::by_state::move (by_state& that)
  {
    state = that.state;
    that.clear ();
  }

  parser::by_state::by_state (state_type s) YY_NOEXCEPT
    : state (s)
  {}

  parser::symbol_kind_type
  parser::by_state::kind () const YY_NOEXCEPT
  {
    if (state == empty_state)
      return symbol_kind::S_YYEMPTY;
    else
      return YY_CAST (symbol_kind_type, yystos_[+state]);
  }

  parser::stack_symbol_type::stack_symbol_type ()
  {}

  parser::stack_symbol_type::stack_symbol_type (YY_RVREF (stack_symbol_type) that)
    : super_type (YY_MOVE (that.state), YY_MOVE (that.value), YY_MOVE (that.location))
  {
#if 201103L <= YY_CPLUSPLUS
    // that is emptied.
    that.state = empty_state;
#endif
  }

  parser::stack_symbol_type::stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) that)
    : super_type (s, YY_MOVE (that.value), YY_MOVE (that.location))
  {
    // that is emptied.
    that.kind_ = symbol_kind::S_YYEMPTY;
  }

#if YY_CPLUSPLUS < 201103L
  parser::stack_symbol_type&
  parser::stack_symbol_type::operator= (const stack_symbol_type& that)
  {
    state = that.state;
    value = that.value;
    location = that.location;
    return *this;
  }

  parser::stack_symbol_type&
  parser::stack_symbol_type::operator= (stack_symbol_type& that)
  {
    state = that.state;
    value = that.value;
    location = that.location;
    // that is emptied.
    that.state = empty_state;
    return *this;
  }
#endif

  template <typename Base>
  void
  parser::yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const
  {
    if (yymsg)
      YY_SYMBOL_PRINT (yymsg, yysym);

    // User destructor.
    switch (yysym.kind ())
    {
      case symbol_kind::S_PAR_BLOCK: // "(...) block"
#line 283 "parsetl.yy"
                    { delete (yysym.value.str); }
#line 486 "parsetl.cc"
        break;

      case symbol_kind::S_BRA_BLOCK: // "{...} block"
#line 283 "parsetl.yy"
                    { delete (yysym.value.str); }
#line 492 "parsetl.cc"
        break;

      case symbol_kind::S_BRA_BANG_BLOCK: // "{...}! block"
#line 283 "parsetl.yy"
                    { delete (yysym.value.str); }
#line 498 "parsetl.cc"
        break;

      case symbol_kind::S_ATOMIC_PROP: // "atomic proposition"
#line 283 "parsetl.yy"
                    { delete (yysym.value.str); }
#line 504 "parsetl.cc"
        break;

      case symbol_kind::S_atomprop: // atomprop
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 510 "parsetl.cc"
        break;

      case symbol_kind::S_booleanatom: // booleanatom
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 516 "parsetl.cc"
        break;

      case symbol_kind::S_sere: // sere
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 522 "parsetl.cc"
        break;

      case symbol_kind::S_bracedsere: // bracedsere
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 528 "parsetl.cc"
        break;

      case symbol_kind::S_parenthesedsubformula: // parenthesedsubformula
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 534 "parsetl.cc"
        break;

      case symbol_kind::S_boolformula: // boolformula
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 540 "parsetl.cc"
        break;

      case symbol_kind::S_subformula: // subformula
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 546 "parsetl.cc"
        break;

      case symbol_kind::S_lbtformula: // lbtformula
#line 284 "parsetl.yy"
                    { (yysym.value.ltl)->destroy(); }
#line 552 "parsetl.cc"
        break;

      default:
        break;
    }
  }

#if TLYYDEBUG
  template <typename Base>
  void
  parser::yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const
  {
    std::ostream& yyoutput = yyo;
    YY_USE (yyoutput);
    if (yysym.empty ())
      yyo << "empty symbol";
    else
      {
        symbol_kind_type yykind = yysym.kind ();
        yyo << (yykind < YYNTOKENS ? "token" : "nterm")
            << ' ' << yysym.name () << " ("
            << yysym.location << ": ";
        switch (yykind)
    {
      case symbol_kind::S_PAR_BLOCK: // "(...) block"
#line 286 "parsetl.yy"
                 { debug_stream() << *(yysym.value.str); }
#line 580 "parsetl.cc"
        break;

      case symbol_kind::S_BRA_BLOCK: // "{...} block"
#line 286 "parsetl.yy"
                 { debug_stream() << *(yysym.value.str); }
#line 586 "parsetl.cc"
        break;

      case symbol_kind::S_BRA_BANG_BLOCK: // "{...}! block"
#line 286 "parsetl.yy"
                 { debug_stream() << *(yysym.value.str); }
#line 592 "parsetl.cc"
        break;

      case symbol_kind::S_OP_SQBKT_NUM: // "number for square bracket operator"
#line 289 "parsetl.yy"
                 { debug_stream() << (yysym.value.num); }
#line 598 "parsetl.cc"
        break;

      case symbol_kind::S_ATOMIC_PROP: // "atomic proposition"
#line 286 "parsetl.yy"
                 { debug_stream() << *(yysym.value.str); }
#line 604 "parsetl.cc"
        break;

      case symbol_kind::S_OP_DELAY_N: // "SVA delay operator"
#line 289 "parsetl.yy"
                 { debug_stream() << (yysym.value.num); }
#line 610 "parsetl.cc"
        break;

      case symbol_kind::S_sqbracketargs: // sqbracketargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 616 "parsetl.cc"
        break;

      case symbol_kind::S_gotoargs: // gotoargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 622 "parsetl.cc"
        break;

      case symbol_kind::S_starargs: // starargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 628 "parsetl.cc"
        break;

      case symbol_kind::S_fstarargs: // fstarargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 634 "parsetl.cc"
        break;

      case symbol_kind::S_equalargs: // equalargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 640 "parsetl.cc"
        break;

      case symbol_kind::S_delayargs: // delayargs
#line 290 "parsetl.yy"
                 { debug_stream() << (yysym.value.minmax).min << ".." << (yysym.value.minmax).max; }
#line 646 "parsetl.cc"
        break;

      case symbol_kind::S_atomprop: // atomprop
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 652 "parsetl.cc"
        break;

      case symbol_kind::S_booleanatom: // booleanatom
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 658 "parsetl.cc"
        break;

      case symbol_kind::S_sere: // sere
#line 288 "parsetl.yy"
                 { print_sere(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 664 "parsetl.cc"
        break;

      case symbol_kind::S_bracedsere: // bracedsere
#line 288 "parsetl.yy"
                 { print_sere(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 670 "parsetl.cc"
        break;

      case symbol_kind::S_parenthesedsubformula: // parenthesedsubformula
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 676 "parsetl.cc"
        break;

      case symbol_kind::S_boolformula: // boolformula
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 682 "parsetl.cc"
        break;

      case symbol_kind::S_subformula: // subformula
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 688 "parsetl.cc"
        break;

      case symbol_kind::S_lbtformula: // lbtformula
#line 287 "parsetl.yy"
                 { print_psl(debug_stream(), formula((yysym.value.ltl)->clone())); }
#line 694 "parsetl.cc"
        break;

      default:
        break;
    }
        yyo << ')';
      }
  }
#endif

  void
  parser::yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym)
  {
    if (m)
      YY_SYMBOL_PRINT (m, sym);
    yystack_.push (YY_MOVE (sym));
  }

  void
  parser::yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym)
  {
#if 201103L <= YY_CPLUSPLUS
    yypush_ (m, stack_symbol_type (s, std::move (sym)));
#else
    stack_symbol_type ss (s, sym);
    yypush_ (m, ss);
#endif
  }

  void
  parser::yypop_ (int n) YY_NOEXCEPT
  {
    yystack_.pop (n);
  }

#if TLYYDEBUG
  std::ostream&
  parser::debug_stream () const
  {
    return *yycdebug_;
  }

  void
  parser::set_debug_stream (std::ostream& o)
  {
    yycdebug_ = &o;
  }


  parser::debug_level_type
  parser::debug_level () const
  {
    return yydebug_;
  }

  void
  parser::set_debug_level (debug_level_type l)
  {
    yydebug_ = l;
  }
#endif // TLYYDEBUG

  parser::state_type
  parser::yy_lr_goto_state_ (state_type yystate, int yysym)
  {
    int yyr = yypgoto_[yysym - YYNTOKENS] + yystate;
    if (0 <= yyr && yyr <= yylast_ && yycheck_[yyr] == yystate)
      return yytable_[yyr];
    else
      return yydefgoto_[yysym - YYNTOKENS];
  }

  bool
  parser::yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT
  {
    return yyvalue == yypact_ninf_;
  }

  bool
  parser::yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT
  {
    return yyvalue == yytable_ninf_;
  }

  int
  parser::operator() ()
  {
    return parse ();
  }

  int
  parser::parse ()
  {
    int yyn;
    /// Length of the RHS of the rule being reduced.
    int yylen = 0;

    // Error handling.
    int yynerrs_ = 0;
    int yyerrstatus_ = 0;

    /// The lookahead symbol.
    symbol_type yyla;

    /// The locations where the error started and ended.
    stack_symbol_type yyerror_range[3];

    /// The return value of parse ().
    int yyresult;

#if YY_EXCEPTIONS
    try
#endif // YY_EXCEPTIONS
      {
    YYCDEBUG << "Starting parse\n";


    /* Initialize the stack.  The initial state will be set in
       yynewstate, since the latter expects the semantical and the
       location values to have been already stored, initialize these
       stacks with a primary value.  */
    yystack_.clear ();
    yypush_ (YY_NULLPTR, 0, YY_MOVE (yyla));

  /*-----------------------------------------------.
  | yynewstate -- push a new symbol on the stack.  |
  `-----------------------------------------------*/
  yynewstate:
    YYCDEBUG << "Entering state " << int (yystack_[0].state) << '\n';
    YY_STACK_PRINT ();

    // Accept?
    if (yystack_[0].state == yyfinal_)
      YYACCEPT;

    goto yybackup;


  /*-----------.
  | yybackup.  |
  `-----------*/
  yybackup:
    // Try to take a decision without lookahead.
    yyn = yypact_[+yystack_[0].state];
    if (yy_pact_value_is_default_ (yyn))
      goto yydefault;

    // Read a lookahead token.
    if (yyla.empty ())
      {
        YYCDEBUG << "Reading a token\n";
#if YY_EXCEPTIONS
        try
#endif // YY_EXCEPTIONS
          {
            yyla.kind_ = yytranslate_ (yylex (&yyla.value, &yyla.location, error_list));
          }
#if YY_EXCEPTIONS
        catch (const syntax_error& yyexc)
          {
            YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
            error (yyexc);
            goto yyerrlab1;
          }
#endif // YY_EXCEPTIONS
      }
    YY_SYMBOL_PRINT ("Next token is", yyla);

    if (yyla.kind () == symbol_kind::S_YYerror)
    {
      // The scanner already issued an error message, process directly
      // to error recovery.  But do not keep the error token as
      // lookahead, it is too special and may lead us to an endless
      // loop in error recovery. */
      yyla.kind_ = symbol_kind::S_YYUNDEF;
      goto yyerrlab1;
    }

    /* If the proper action on seeing token YYLA.TYPE is to reduce or
       to detect an error, take that action.  */
    yyn += yyla.kind ();
    if (yyn < 0 || yylast_ < yyn || yycheck_[yyn] != yyla.kind ())
      {
        goto yydefault;
      }

    // Reduce or error.
    yyn = yytable_[yyn];
    if (yyn <= 0)
      {
        if (yy_table_value_is_error_ (yyn))
          goto yyerrlab;
        yyn = -yyn;
        goto yyreduce;
      }

    // Count tokens shifted since error; after three, turn off error status.
    if (yyerrstatus_)
      --yyerrstatus_;

    // Shift the lookahead token.
    yypush_ ("Shifting", state_type (yyn), YY_MOVE (yyla));
    goto yynewstate;


  /*-----------------------------------------------------------.
  | yydefault -- do the default action for the current state.  |
  `-----------------------------------------------------------*/
  yydefault:
    yyn = yydefact_[+yystack_[0].state];
    if (yyn == 0)
      goto yyerrlab;
    goto yyreduce;


  /*-----------------------------.
  | yyreduce -- do a reduction.  |
  `-----------------------------*/
  yyreduce:
    yylen = yyr2_[yyn];
    {
      stack_symbol_type yylhs;
      yylhs.state = yy_lr_goto_state_ (yystack_[yylen].state, yyr1_[yyn]);
      /* If YYLEN is nonzero, implement the default value of the
         action: '$$ = $1'.  Otherwise, use the top of the stack.

         Otherwise, the following line sets YYLHS.VALUE to garbage.
         This behavior is undocumented and Bison users should not rely
         upon it.  */
      if (yylen)
        yylhs.value = yystack_[yylen - 1].value;
      else
        yylhs.value = yystack_[0].value;

      // Default location.
      {
        stack_type::slice range (yystack_, yylen);
        YYLLOC_DEFAULT (yylhs.location, range, yylen);
        yyerror_range[1].location = yylhs.location;
      }

      // Perform the reduction.
      YY_REDUCE_PRINT (yyn);
#if YY_EXCEPTIONS
      try
#endif // YY_EXCEPTIONS
        {
          switch (yyn)
            {
  case 2: // result: "LTL start marker" subformula "end of formula"
#line 294 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 950 "parsetl.cc"
    break;

  case 3: // result: "LTL start marker" enderror
#line 299 "parsetl.yy"
              {
		result = nullptr;
		YYABORT;
	      }
#line 959 "parsetl.cc"
    break;

  case 4: // result: "LTL start marker" subformula enderror
#line 304 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 968 "parsetl.cc"
    break;

  case 5: // result: "LTL start marker" emptyinput
#line 309 "parsetl.yy"
              { YYABORT; }
#line 974 "parsetl.cc"
    break;

  case 6: // result: "BOOLEAN start marker" boolformula "end of formula"
#line 311 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 983 "parsetl.cc"
    break;

  case 7: // result: "BOOLEAN start marker" enderror
#line 316 "parsetl.yy"
              {
		result = nullptr;
		YYABORT;
	      }
#line 992 "parsetl.cc"
    break;

  case 8: // result: "BOOLEAN start marker" boolformula enderror
#line 321 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 1001 "parsetl.cc"
    break;

  case 9: // result: "BOOLEAN start marker" emptyinput
#line 326 "parsetl.yy"
              { YYABORT; }
#line 1007 "parsetl.cc"
    break;

  case 10: // result: "SERE start marker" sere "end of formula"
#line 328 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 1016 "parsetl.cc"
    break;

  case 11: // result: "SERE start marker" enderror
#line 333 "parsetl.yy"
              {
		result = nullptr;
		YYABORT;
	      }
#line 1025 "parsetl.cc"
    break;

  case 12: // result: "SERE start marker" sere enderror
#line 338 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 1034 "parsetl.cc"
    break;

  case 13: // result: "SERE start marker" emptyinput
#line 343 "parsetl.yy"
              { YYABORT; }
#line 1040 "parsetl.cc"
    break;

  case 14: // result: "LBT start marker" lbtformula "end of formula"
#line 345 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 1049 "parsetl.cc"
    break;

  case 15: // result: "LBT start marker" enderror
#line 350 "parsetl.yy"
              {
		result = nullptr;
		YYABORT;
	      }
#line 1058 "parsetl.cc"
    break;

  case 16: // result: "LBT start marker" lbtformula enderror
#line 355 "parsetl.yy"
              {
		result = formula((yystack_[1].value.ltl));
		YYACCEPT;
	      }
#line 1067 "parsetl.cc"
    break;

  case 17: // result: "LBT start marker" emptyinput
#line 360 "parsetl.yy"
              { YYABORT; }
#line 1073 "parsetl.cc"
    break;

  case 18: // emptyinput: "end of formula"
#line 363 "parsetl.yy"
              {
		error_list.emplace_back(yylhs.location, "empty input");
		result = nullptr;
	      }
#line 1082 "parsetl.cc"
    break;

  case 19: // enderror: error "end of formula"
#line 369 "parsetl.yy"
              {
		error_list.emplace_back(yystack_[1].location, "ignoring trailing garbage");
	      }
#line 1090 "parsetl.cc"
    break;

  case 26: // sqbracketargs: "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket"
#line 382 "parsetl.yy"
              { (yylhs.value.minmax).min = (yystack_[3].value.num); (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1096 "parsetl.cc"
    break;

  case 27: // sqbracketargs: "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing bracket"
#line 384 "parsetl.yy"
              { (yylhs.value.minmax).min = (yystack_[2].value.num); (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1102 "parsetl.cc"
    break;

  case 28: // sqbracketargs: "separator for square bracket operator" "number for square bracket operator" "closing bracket"
#line 386 "parsetl.yy"
              { (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1108 "parsetl.cc"
    break;

  case 29: // sqbracketargs: OP_SQBKT_SEP_opt "closing bracket"
#line 388 "parsetl.yy"
              { (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1114 "parsetl.cc"
    break;

  case 30: // sqbracketargs: "number for square bracket operator" "closing bracket"
#line 390 "parsetl.yy"
              { (yylhs.value.minmax).min = (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1120 "parsetl.cc"
    break;

  case 31: // gotoargs: "opening bracket for goto operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket"
#line 394 "parsetl.yy"
           { (yylhs.value.minmax).min = (yystack_[3].value.num); (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1126 "parsetl.cc"
    break;

  case 32: // gotoargs: "opening bracket for goto operator" "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing bracket"
#line 396 "parsetl.yy"
           { (yylhs.value.minmax).min = (yystack_[2].value.num); (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1132 "parsetl.cc"
    break;

  case 33: // gotoargs: "opening bracket for goto operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket"
#line 398 "parsetl.yy"
           { (yylhs.value.minmax).min = 1U; (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1138 "parsetl.cc"
    break;

  case 34: // gotoargs: "opening bracket for goto operator" OP_SQBKT_SEP_unbounded "closing bracket"
#line 400 "parsetl.yy"
           { (yylhs.value.minmax).min = 1U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1144 "parsetl.cc"
    break;

  case 35: // gotoargs: "opening bracket for goto operator" "closing bracket"
#line 402 "parsetl.yy"
           { (yylhs.value.minmax).min = (yylhs.value.minmax).max = 1U; }
#line 1150 "parsetl.cc"
    break;

  case 36: // gotoargs: "opening bracket for goto operator" "number for square bracket operator" "closing bracket"
#line 404 "parsetl.yy"
           { (yylhs.value.minmax).min = (yylhs.value.minmax).max = (yystack_[1].value.num); }
#line 1156 "parsetl.cc"
    break;

  case 37: // gotoargs: "opening bracket for goto operator" error "closing bracket"
#line 406 "parsetl.yy"
           { error_list.emplace_back(yylhs.location, "treating this goto block as [->]");
             (yylhs.value.minmax).min = (yylhs.value.minmax).max = 1U; }
#line 1163 "parsetl.cc"
    break;

  case 38: // gotoargs: "opening bracket for goto operator" error_opt "end of formula"
#line 409 "parsetl.yy"
           { error_list.
	       emplace_back(yylhs.location, "missing closing bracket for goto operator");
	     (yylhs.value.minmax).min = (yylhs.value.minmax).max = 0U; }
#line 1171 "parsetl.cc"
    break;

  case 41: // starargs: kleen_star
#line 416 "parsetl.yy"
            { (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1177 "parsetl.cc"
    break;

  case 42: // starargs: "plus operator"
#line 418 "parsetl.yy"
            { (yylhs.value.minmax).min = 1U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1183 "parsetl.cc"
    break;

  case 43: // starargs: "opening bracket for star operator" sqbracketargs
#line 420 "parsetl.yy"
            { (yylhs.value.minmax) = (yystack_[0].value.minmax); }
#line 1189 "parsetl.cc"
    break;

  case 44: // starargs: "opening bracket for star operator" error "closing bracket"
#line 422 "parsetl.yy"
            { error_list.emplace_back(yylhs.location, "treating this star block as [*]");
              (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1196 "parsetl.cc"
    break;

  case 45: // starargs: "opening bracket for star operator" error_opt "end of formula"
#line 425 "parsetl.yy"
            { error_list.emplace_back(yylhs.location, "missing closing bracket for star");
	      (yylhs.value.minmax).min = (yylhs.value.minmax).max = 0U; }
#line 1203 "parsetl.cc"
    break;

  case 46: // fstarargs: "bracket fusion-star operator"
#line 429 "parsetl.yy"
            { (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1209 "parsetl.cc"
    break;

  case 47: // fstarargs: "fusion-plus operator"
#line 431 "parsetl.yy"
            { (yylhs.value.minmax).min = 1U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1215 "parsetl.cc"
    break;

  case 48: // fstarargs: "opening bracket for fusion-star operator" sqbracketargs
#line 433 "parsetl.yy"
            { (yylhs.value.minmax) = (yystack_[0].value.minmax); }
#line 1221 "parsetl.cc"
    break;

  case 49: // fstarargs: "opening bracket for fusion-star operator" error "closing bracket"
#line 435 "parsetl.yy"
            { error_list.emplace_back
		(yylhs.location, "treating this fusion-star block as [:*]");
              (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1229 "parsetl.cc"
    break;

  case 50: // fstarargs: "opening bracket for fusion-star operator" error_opt "end of formula"
#line 439 "parsetl.yy"
            { error_list.emplace_back
		(yylhs.location, "missing closing bracket for fusion-star");
	      (yylhs.value.minmax).min = (yylhs.value.minmax).max = 0U; }
#line 1237 "parsetl.cc"
    break;

  case 51: // equalargs: "opening bracket for equal operator" sqbracketargs
#line 444 "parsetl.yy"
            { (yylhs.value.minmax) = (yystack_[0].value.minmax); }
#line 1243 "parsetl.cc"
    break;

  case 52: // equalargs: "opening bracket for equal operator" error "closing bracket"
#line 446 "parsetl.yy"
            { error_list.emplace_back(yylhs.location, "treating this equal block as [=]");
              (yylhs.value.minmax).min = 0U; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1250 "parsetl.cc"
    break;

  case 53: // equalargs: "opening bracket for equal operator" error_opt "end of formula"
#line 449 "parsetl.yy"
            { error_list.
		emplace_back(yylhs.location, "missing closing bracket for equal operator");
	      (yylhs.value.minmax).min = (yylhs.value.minmax).max = 0U; }
#line 1258 "parsetl.cc"
    break;

  case 54: // delayargs: "opening bracket for SVA delay operator" sqbracketargs
#line 454 "parsetl.yy"
            { (yylhs.value.minmax) = (yystack_[0].value.minmax); }
#line 1264 "parsetl.cc"
    break;

  case 55: // delayargs: "opening bracket for SVA delay operator" error "closing bracket"
#line 456 "parsetl.yy"
            { error_list.emplace_back(yylhs.location, "treating this delay block as ##1");
              (yylhs.value.minmax).min = (yylhs.value.minmax).max = 1U; }
#line 1271 "parsetl.cc"
    break;

  case 56: // delayargs: "opening bracket for SVA delay operator" error_opt "end of formula"
#line 459 "parsetl.yy"
            { error_list.
		emplace_back(yylhs.location, "missing closing bracket for ##[");
	      (yylhs.value.minmax).min = (yylhs.value.minmax).max = 1U; }
#line 1279 "parsetl.cc"
    break;

  case 57: // delayargs: "##[+] operator"
#line 463 "parsetl.yy"
          { (yylhs.value.minmax).min = 1; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1285 "parsetl.cc"
    break;

  case 58: // delayargs: "##[*] operator"
#line 465 "parsetl.yy"
          { (yylhs.value.minmax).min = 0; (yylhs.value.minmax).max = fnode::unbounded(); }
#line 1291 "parsetl.cc"
    break;

  case 59: // atomprop: "atomic proposition"
#line 468 "parsetl.yy"
          {
            (yylhs.value.ltl) = parse_ap(*(yystack_[0].value.str), yystack_[0].location, parse_environment, error_list);
            delete (yystack_[0].value.str);
            if (!(yylhs.value.ltl))
              YYERROR;
          }
#line 1302 "parsetl.cc"
    break;

  case 60: // booleanatom: atomprop
#line 475 "parsetl.yy"
             { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 1308 "parsetl.cc"
    break;

  case 61: // booleanatom: atomprop "positive suffix"
#line 476 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[1].value.ltl); }
#line 1314 "parsetl.cc"
    break;

  case 62: // booleanatom: atomprop "negative suffix"
#line 478 "parsetl.yy"
              {
		(yylhs.value.ltl) = fnode::unop(op::Not, (yystack_[1].value.ltl));
	      }
#line 1322 "parsetl.cc"
    break;

  case 63: // booleanatom: "constant true"
#line 482 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::tt(); }
#line 1328 "parsetl.cc"
    break;

  case 64: // booleanatom: "constant false"
#line 484 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::ff(); }
#line 1334 "parsetl.cc"
    break;

  case 65: // sere: booleanatom
#line 486 "parsetl.yy"
      { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 1340 "parsetl.cc"
    break;

  case 66: // sere: "not operator" sere
#line 488 "parsetl.yy"
              {
		if (sere_ensure_bool((yystack_[0].value.ltl), yystack_[0].location, "`!'", error_list))
		  {
		    (yylhs.value.ltl) = fnode::unop(op::Not, (yystack_[0].value.ltl));
		  }
		else
		  {
		    (yystack_[0].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1356 "parsetl.cc"
    break;

  case 67: // sere: bracedsere
#line 499 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 1362 "parsetl.cc"
    break;

  case 68: // sere: "(...) block"
#line 501 "parsetl.yy"
              {
		(yylhs.value.ltl) =
		  try_recursive_parse(*(yystack_[0].value.str), yystack_[0].location, parse_environment,
				      debug_level(), parser_sere, error_list);
		delete (yystack_[0].value.str);
		if (!(yylhs.value.ltl))
		  YYERROR;
	      }
#line 1375 "parsetl.cc"
    break;

  case 69: // sere: "opening parenthesis" sere "closing parenthesis"
#line 510 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[1].value.ltl); }
#line 1381 "parsetl.cc"
    break;

  case 70: // sere: "opening parenthesis" error "closing parenthesis"
#line 512 "parsetl.yy"
              { error_list.
		  emplace_back(yylhs.location,
			       "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1391 "parsetl.cc"
    break;

  case 71: // sere: "opening parenthesis" sere "end of formula"
#line 518 "parsetl.yy"
              { error_list.emplace_back(yystack_[2].location + yystack_[1].location, "missing closing parenthesis");
		(yylhs.value.ltl) = (yystack_[1].value.ltl);
	      }
#line 1399 "parsetl.cc"
    break;

  case 72: // sere: "opening parenthesis" error "end of formula"
#line 522 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
                    "missing closing parenthesis, "
		    "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1409 "parsetl.cc"
    break;

  case 73: // sere: sere "and operator" sere
#line 528 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::AndRat, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1415 "parsetl.cc"
    break;

  case 74: // sere: sere "and operator" error
#line 530 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
				    "length-matching and operator"); }
#line 1422 "parsetl.cc"
    break;

  case 75: // sere: sere "short and operator" sere
#line 533 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::AndNLM, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1428 "parsetl.cc"
    break;

  case 76: // sere: sere "short and operator" error
#line 535 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
                                    "non-length-matching and operator"); }
#line 1435 "parsetl.cc"
    break;

  case 77: // sere: sere "or operator" sere
#line 538 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::OrRat, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1441 "parsetl.cc"
    break;

  case 78: // sere: sere "or operator" error
#line 540 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "or operator"); }
#line 1447 "parsetl.cc"
    break;

  case 79: // sere: sere "concat operator" sere
#line 542 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::Concat, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1453 "parsetl.cc"
    break;

  case 80: // sere: sere "concat operator" error
#line 544 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "concat operator"); }
#line 1459 "parsetl.cc"
    break;

  case 81: // sere: sere "fusion operator" sere
#line 546 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::Fusion, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1465 "parsetl.cc"
    break;

  case 82: // sere: sere "fusion operator" error
#line 548 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "fusion operator"); }
#line 1471 "parsetl.cc"
    break;

  case 83: // sere: "SVA delay operator" sere
#line 550 "parsetl.yy"
              { (yylhs.value.ltl) = formula::sugar_delay(formula((yystack_[0].value.ltl)), (yystack_[1].value.num), (yystack_[1].value.num)).to_node_(); }
#line 1477 "parsetl.cc"
    break;

  case 84: // sere: "SVA delay operator" error
#line 552 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), fnode::tt(), yystack_[1].location, "SVA delay operator"); }
#line 1483 "parsetl.cc"
    break;

  case 85: // sere: sere "SVA delay operator" sere
#line 554 "parsetl.yy"
              { (yylhs.value.ltl) = formula::sugar_delay(formula((yystack_[2].value.ltl)), formula((yystack_[0].value.ltl)),
                                          (yystack_[1].value.num), (yystack_[1].value.num)).to_node_(); }
#line 1490 "parsetl.cc"
    break;

  case 86: // sere: sere "SVA delay operator" error
#line 557 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "SVA delay operator"); }
#line 1496 "parsetl.cc"
    break;

  case 87: // sere: delayargs sere
#line 559 "parsetl.yy"
              {
		if ((yystack_[1].value.minmax).max < (yystack_[1].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[1].location, "reversed range");
		    std::swap((yystack_[1].value.minmax).max, (yystack_[1].value.minmax).min);
		  }
                (yylhs.value.ltl) = formula::sugar_delay(formula((yystack_[0].value.ltl)),
                                          (yystack_[1].value.minmax).min, (yystack_[1].value.minmax).max).to_node_();
              }
#line 1510 "parsetl.cc"
    break;

  case 88: // sere: delayargs error
#line 569 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), fnode::tt(), yystack_[1].location, "SVA delay operator"); }
#line 1516 "parsetl.cc"
    break;

  case 89: // sere: sere delayargs sere
#line 571 "parsetl.yy"
              {
		if ((yystack_[1].value.minmax).max < (yystack_[1].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[2].location, "reversed range");
		    std::swap((yystack_[1].value.minmax).max, (yystack_[1].value.minmax).min);
		  }
                (yylhs.value.ltl) = formula::sugar_delay(formula((yystack_[2].value.ltl)), formula((yystack_[0].value.ltl)),
                                          (yystack_[1].value.minmax).min, (yystack_[1].value.minmax).max).to_node_();
              }
#line 1530 "parsetl.cc"
    break;

  case 90: // sere: sere delayargs error
#line 581 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "SVA delay operator"); }
#line 1536 "parsetl.cc"
    break;

  case 91: // sere: starargs
#line 583 "parsetl.yy"
              {
		if ((yystack_[0].value.minmax).max < (yystack_[0].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[0].location, "reversed range");
		    std::swap((yystack_[0].value.minmax).max, (yystack_[0].value.minmax).min);
		  }
		(yylhs.value.ltl) = fnode::bunop(op::Star, fnode::tt(), (yystack_[0].value.minmax).min, (yystack_[0].value.minmax).max);
	      }
#line 1549 "parsetl.cc"
    break;

  case 92: // sere: sere starargs
#line 592 "parsetl.yy"
              {
		if ((yystack_[0].value.minmax).max < (yystack_[0].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[0].location, "reversed range");
		    std::swap((yystack_[0].value.minmax).max, (yystack_[0].value.minmax).min);
		  }
		(yylhs.value.ltl) = fnode::bunop(op::Star, (yystack_[1].value.ltl), (yystack_[0].value.minmax).min, (yystack_[0].value.minmax).max);
	      }
#line 1562 "parsetl.cc"
    break;

  case 93: // sere: sere fstarargs
#line 601 "parsetl.yy"
              {
		if ((yystack_[0].value.minmax).max < (yystack_[0].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[0].location, "reversed range");
		    std::swap((yystack_[0].value.minmax).max, (yystack_[0].value.minmax).min);
		  }
		(yylhs.value.ltl) = fnode::bunop(op::FStar, (yystack_[1].value.ltl), (yystack_[0].value.minmax).min, (yystack_[0].value.minmax).max);
	      }
#line 1575 "parsetl.cc"
    break;

  case 94: // sere: sere equalargs
#line 610 "parsetl.yy"
              {
		if ((yystack_[0].value.minmax).max < (yystack_[0].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[0].location, "reversed range");
		    std::swap((yystack_[0].value.minmax).max, (yystack_[0].value.minmax).min);
		  }
		if (sere_ensure_bool((yystack_[1].value.ltl), yystack_[1].location, "[=...]", error_list))
		  {
		    (yylhs.value.ltl) = formula::sugar_equal(formula((yystack_[1].value.ltl)),
					      (yystack_[0].value.minmax).min, (yystack_[0].value.minmax).max).to_node_();
		  }
		else
		  {
		    (yystack_[1].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1597 "parsetl.cc"
    break;

  case 95: // sere: sere gotoargs
#line 628 "parsetl.yy"
              {
		if ((yystack_[0].value.minmax).max < (yystack_[0].value.minmax).min)
		  {
		    error_list.emplace_back(yystack_[0].location, "reversed range");
		    std::swap((yystack_[0].value.minmax).max, (yystack_[0].value.minmax).min);
		  }
		if (sere_ensure_bool((yystack_[1].value.ltl), yystack_[1].location, "[->...]", error_list))
		  {
		    (yylhs.value.ltl) = formula::sugar_goto(formula((yystack_[1].value.ltl)),
					     (yystack_[0].value.minmax).min, (yystack_[0].value.minmax).max).to_node_();
		  }
		else
		  {
		    (yystack_[1].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1619 "parsetl.cc"
    break;

  case 96: // sere: sere "xor operator" sere
#line 646 "parsetl.yy"
              {
		if (sere_ensure_bool((yystack_[2].value.ltl), yystack_[2].location, "`^'", error_list)
                    && sere_ensure_bool((yystack_[0].value.ltl), yystack_[0].location, "`^'", error_list))
		  {
		    (yylhs.value.ltl) = fnode::binop(op::Xor, (yystack_[2].value.ltl), (yystack_[0].value.ltl));
		  }
		else
		  {
		    (yystack_[2].value.ltl)->destroy();
		    (yystack_[0].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1637 "parsetl.cc"
    break;

  case 97: // sere: sere "xor operator" error
#line 660 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "xor operator"); }
#line 1643 "parsetl.cc"
    break;

  case 98: // sere: sere "implication operator" sere
#line 662 "parsetl.yy"
              {
		if (sere_ensure_bool((yystack_[2].value.ltl), yystack_[2].location, "`->'", error_list))
		  {
		    (yylhs.value.ltl) = fnode::binop(op::Implies, (yystack_[2].value.ltl), (yystack_[0].value.ltl));
		  }
		else
		  {
		    (yystack_[2].value.ltl)->destroy();
		    (yystack_[0].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1660 "parsetl.cc"
    break;

  case 99: // sere: sere "implication operator" error
#line 675 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "implication operator"); }
#line 1666 "parsetl.cc"
    break;

  case 100: // sere: sere "equivalent operator" sere
#line 677 "parsetl.yy"
              {
		if (sere_ensure_bool((yystack_[2].value.ltl), yystack_[2].location, "`<->'", error_list)
                    && sere_ensure_bool((yystack_[0].value.ltl), yystack_[0].location, "`<->'", error_list))
		  {
		    (yylhs.value.ltl) = fnode::binop(op::Equiv, (yystack_[2].value.ltl), (yystack_[0].value.ltl));
		  }
		else
		  {
		    (yystack_[2].value.ltl)->destroy();
		    (yystack_[0].value.ltl)->destroy();
		    (yylhs.value.ltl) = error_false_block(yylhs.location, error_list);
		  }
	      }
#line 1684 "parsetl.cc"
    break;

  case 101: // sere: sere "equivalent operator" error
#line 691 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "equivalent operator"); }
#line 1690 "parsetl.cc"
    break;

  case 102: // sere: "first_match" "opening parenthesis" sere "closing parenthesis"
#line 693 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::first_match, (yystack_[1].value.ltl)); }
#line 1696 "parsetl.cc"
    break;

  case 103: // bracedsere: "opening brace" sere "closing brace"
#line 696 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[1].value.ltl); }
#line 1702 "parsetl.cc"
    break;

  case 104: // bracedsere: "opening brace" sere error "closing brace"
#line 698 "parsetl.yy"
              { error_list.emplace_back(yystack_[1].location, "ignoring this");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1710 "parsetl.cc"
    break;

  case 105: // bracedsere: "opening brace" error "closing brace"
#line 702 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
					"treating this brace block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1719 "parsetl.cc"
    break;

  case 106: // bracedsere: "opening brace" sere "end of formula"
#line 707 "parsetl.yy"
              { error_list.emplace_back(yystack_[2].location + yystack_[1].location,
					"missing closing brace");
		(yylhs.value.ltl) = (yystack_[1].value.ltl);
	      }
#line 1728 "parsetl.cc"
    break;

  case 107: // bracedsere: "opening brace" sere error "end of formula"
#line 712 "parsetl.yy"
              { error_list. emplace_back(yystack_[1].location,
                  "ignoring trailing garbage and missing closing brace");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1737 "parsetl.cc"
    break;

  case 108: // bracedsere: "opening brace" error "end of formula"
#line 717 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
                    "missing closing brace, "
		    "treating this brace block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1747 "parsetl.cc"
    break;

  case 109: // bracedsere: "{...} block"
#line 723 "parsetl.yy"
              {
		(yylhs.value.ltl) = try_recursive_parse(*(yystack_[0].value.str), yystack_[0].location, parse_environment,
					 debug_level(),
                                         parser_sere, error_list);
		delete (yystack_[0].value.str);
		if (!(yylhs.value.ltl))
		  YYERROR;
	      }
#line 1760 "parsetl.cc"
    break;

  case 110: // parenthesedsubformula: "(...) block"
#line 733 "parsetl.yy"
              {
		(yylhs.value.ltl) = try_recursive_parse(*(yystack_[0].value.str), yystack_[0].location, parse_environment,
					 debug_level(), parser_ltl, error_list);
		delete (yystack_[0].value.str);
		if (!(yylhs.value.ltl))
		  YYERROR;
	      }
#line 1772 "parsetl.cc"
    break;

  case 111: // parenthesedsubformula: "opening parenthesis" subformula "closing parenthesis"
#line 741 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[1].value.ltl); }
#line 1778 "parsetl.cc"
    break;

  case 112: // parenthesedsubformula: "opening parenthesis" subformula error "closing parenthesis"
#line 743 "parsetl.yy"
              { error_list.emplace_back(yystack_[1].location, "ignoring this");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1786 "parsetl.cc"
    break;

  case 113: // parenthesedsubformula: "opening parenthesis" error "closing parenthesis"
#line 747 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
		 "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1795 "parsetl.cc"
    break;

  case 114: // parenthesedsubformula: "opening parenthesis" subformula "end of formula"
#line 752 "parsetl.yy"
              { error_list.emplace_back(yystack_[2].location + yystack_[1].location, "missing closing parenthesis");
		(yylhs.value.ltl) = (yystack_[1].value.ltl);
	      }
#line 1803 "parsetl.cc"
    break;

  case 115: // parenthesedsubformula: "opening parenthesis" subformula error "end of formula"
#line 756 "parsetl.yy"
              { error_list.emplace_back(yystack_[1].location,
                "ignoring trailing garbage and missing closing parenthesis");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1812 "parsetl.cc"
    break;

  case 116: // parenthesedsubformula: "opening parenthesis" error "end of formula"
#line 761 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
                    "missing closing parenthesis, "
		    "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1822 "parsetl.cc"
    break;

  case 117: // boolformula: booleanatom
#line 768 "parsetl.yy"
             { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 1828 "parsetl.cc"
    break;

  case 118: // boolformula: "(...) block"
#line 770 "parsetl.yy"
              {
		(yylhs.value.ltl) = try_recursive_parse(*(yystack_[0].value.str), yystack_[0].location, parse_environment,
					 debug_level(),
                                         parser_bool, error_list);
		delete (yystack_[0].value.str);
		if (!(yylhs.value.ltl))
		  YYERROR;
	      }
#line 1841 "parsetl.cc"
    break;

  case 119: // boolformula: "opening parenthesis" boolformula "closing parenthesis"
#line 779 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[1].value.ltl); }
#line 1847 "parsetl.cc"
    break;

  case 120: // boolformula: "opening parenthesis" boolformula error "closing parenthesis"
#line 781 "parsetl.yy"
              { error_list.emplace_back(yystack_[1].location, "ignoring this");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1855 "parsetl.cc"
    break;

  case 121: // boolformula: "opening parenthesis" error "closing parenthesis"
#line 785 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
		 "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1864 "parsetl.cc"
    break;

  case 122: // boolformula: "opening parenthesis" boolformula "end of formula"
#line 790 "parsetl.yy"
              { error_list.emplace_back(yystack_[2].location + yystack_[1].location,
					"missing closing parenthesis");
		(yylhs.value.ltl) = (yystack_[1].value.ltl);
	      }
#line 1873 "parsetl.cc"
    break;

  case 123: // boolformula: "opening parenthesis" boolformula error "end of formula"
#line 795 "parsetl.yy"
              { error_list.emplace_back(yystack_[1].location,
                "ignoring trailing garbage and missing closing parenthesis");
		(yylhs.value.ltl) = (yystack_[2].value.ltl);
	      }
#line 1882 "parsetl.cc"
    break;

  case 124: // boolformula: "opening parenthesis" error "end of formula"
#line 800 "parsetl.yy"
              { error_list.emplace_back(yylhs.location,
                    "missing closing parenthesis, "
		    "treating this parenthetical block as false");
		(yylhs.value.ltl) = fnode::ff();
	      }
#line 1892 "parsetl.cc"
    break;

  case 125: // boolformula: boolformula "and operator" boolformula
#line 806 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1898 "parsetl.cc"
    break;

  case 126: // boolformula: boolformula "and operator" error
#line 808 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 1904 "parsetl.cc"
    break;

  case 127: // boolformula: boolformula "short and operator" boolformula
#line 810 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1910 "parsetl.cc"
    break;

  case 128: // boolformula: boolformula "short and operator" error
#line 812 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 1916 "parsetl.cc"
    break;

  case 129: // boolformula: boolformula "star operator" boolformula
#line 814 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1922 "parsetl.cc"
    break;

  case 130: // boolformula: boolformula "star operator" error
#line 816 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 1928 "parsetl.cc"
    break;

  case 131: // boolformula: boolformula "or operator" boolformula
#line 818 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::Or, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 1934 "parsetl.cc"
    break;

  case 132: // boolformula: boolformula "or operator" error
#line 820 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "or operator"); }
#line 1940 "parsetl.cc"
    break;

  case 133: // boolformula: boolformula "xor operator" boolformula
#line 822 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Xor, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 1946 "parsetl.cc"
    break;

  case 134: // boolformula: boolformula "xor operator" error
#line 824 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "xor operator"); }
#line 1952 "parsetl.cc"
    break;

  case 135: // boolformula: boolformula "implication operator" boolformula
#line 826 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Implies, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 1958 "parsetl.cc"
    break;

  case 136: // boolformula: boolformula "implication operator" error
#line 828 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "implication operator"); }
#line 1964 "parsetl.cc"
    break;

  case 137: // boolformula: boolformula "equivalent operator" boolformula
#line 830 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Equiv, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 1970 "parsetl.cc"
    break;

  case 138: // boolformula: boolformula "equivalent operator" error
#line 832 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "equivalent operator"); }
#line 1976 "parsetl.cc"
    break;

  case 139: // boolformula: "not operator" boolformula
#line 834 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::Not, (yystack_[0].value.ltl)); }
#line 1982 "parsetl.cc"
    break;

  case 140: // boolformula: "not operator" error
#line 836 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "not operator"); }
#line 1988 "parsetl.cc"
    break;

  case 141: // subformula: booleanatom
#line 838 "parsetl.yy"
            { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 1994 "parsetl.cc"
    break;

  case 142: // subformula: parenthesedsubformula
#line 839 "parsetl.yy"
              { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 2000 "parsetl.cc"
    break;

  case 143: // subformula: subformula "and operator" subformula
#line 841 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 2006 "parsetl.cc"
    break;

  case 144: // subformula: subformula "and operator" error
#line 843 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 2012 "parsetl.cc"
    break;

  case 145: // subformula: subformula "short and operator" subformula
#line 845 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 2018 "parsetl.cc"
    break;

  case 146: // subformula: subformula "short and operator" error
#line 847 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 2024 "parsetl.cc"
    break;

  case 147: // subformula: subformula "star operator" subformula
#line 849 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 2030 "parsetl.cc"
    break;

  case 148: // subformula: subformula "star operator" error
#line 851 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "and operator"); }
#line 2036 "parsetl.cc"
    break;

  case 149: // subformula: subformula "or operator" subformula
#line 853 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::Or, {(yystack_[2].value.ltl), (yystack_[0].value.ltl)}); }
#line 2042 "parsetl.cc"
    break;

  case 150: // subformula: subformula "or operator" error
#line 855 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "or operator"); }
#line 2048 "parsetl.cc"
    break;

  case 151: // subformula: subformula "xor operator" subformula
#line 857 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Xor, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2054 "parsetl.cc"
    break;

  case 152: // subformula: subformula "xor operator" error
#line 859 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "xor operator"); }
#line 2060 "parsetl.cc"
    break;

  case 153: // subformula: subformula "implication operator" subformula
#line 861 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Implies, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2066 "parsetl.cc"
    break;

  case 154: // subformula: subformula "implication operator" error
#line 863 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "implication operator"); }
#line 2072 "parsetl.cc"
    break;

  case 155: // subformula: subformula "equivalent operator" subformula
#line 865 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Equiv, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2078 "parsetl.cc"
    break;

  case 156: // subformula: subformula "equivalent operator" error
#line 867 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "equivalent operator"); }
#line 2084 "parsetl.cc"
    break;

  case 157: // subformula: subformula "until operator" subformula
#line 869 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::U, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2090 "parsetl.cc"
    break;

  case 158: // subformula: subformula "until operator" error
#line 871 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "until operator"); }
#line 2096 "parsetl.cc"
    break;

  case 159: // subformula: subformula "release operator" subformula
#line 873 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::R, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2102 "parsetl.cc"
    break;

  case 160: // subformula: subformula "release operator" error
#line 875 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "release operator"); }
#line 2108 "parsetl.cc"
    break;

  case 161: // subformula: subformula "weak until operator" subformula
#line 877 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::W, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2114 "parsetl.cc"
    break;

  case 162: // subformula: subformula "weak until operator" error
#line 879 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "weak until operator"); }
#line 2120 "parsetl.cc"
    break;

  case 163: // subformula: subformula "strong release operator" subformula
#line 881 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::M, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2126 "parsetl.cc"
    break;

  case 164: // subformula: subformula "strong release operator" error
#line 883 "parsetl.yy"
              { missing_right_binop((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location, "strong release operator"); }
#line 2132 "parsetl.cc"
    break;

  case 165: // subformula: "sometimes operator" subformula
#line 885 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2138 "parsetl.cc"
    break;

  case 166: // subformula: "sometimes operator" error
#line 887 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "sometimes operator"); }
#line 2144 "parsetl.cc"
    break;

  case 167: // subformula: "F[.] operator" "number for square bracket operator" "closing bracket" subformula
#line 889 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::Or, (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl));
                error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "F[n:m] expects two parameters");
              }
#line 2153 "parsetl.cc"
    break;

  case 168: // subformula: "F[.] operator" "number for square bracket operator" "closing !]" subformula
#line 895 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X, op::Or, (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl));
                error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "F[n:m!] expects two parameters");
              }
#line 2162 "parsetl.cc"
    break;

  case 169: // subformula: "F[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket" subformula
#line 901 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::Or, (yystack_[4].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2168 "parsetl.cc"
    break;

  case 170: // subformula: "F[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing !]" subformula
#line 904 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X,
                                              op::Or, (yystack_[4].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2175 "parsetl.cc"
    break;

  case 171: // subformula: "F[.] operator" "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing bracket" subformula
#line 908 "parsetl.yy"
            { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::Or, (yystack_[3].value.num),
                                            fnode::unbounded(), (yystack_[0].value.ltl)); }
#line 2182 "parsetl.cc"
    break;

  case 172: // subformula: "F[.] operator" "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing !]" subformula
#line 912 "parsetl.yy"
            { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X, op::Or, (yystack_[3].value.num),
                                            fnode::unbounded(), (yystack_[0].value.ltl)); }
#line 2189 "parsetl.cc"
    break;

  case 173: // subformula: "F[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket" error
#line 916 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[5].location + yystack_[1].location, "F[.] operator"); }
#line 2195 "parsetl.cc"
    break;

  case 174: // subformula: "F[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing !]" error
#line 919 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[5].location + yystack_[1].location, "F[.!] operator"); }
#line 2201 "parsetl.cc"
    break;

  case 175: // subformula: "F[.] operator" error_opt "end of formula"
#line 921 "parsetl.yy"
              { error_list.emplace_back(yylhs.location, "missing closing bracket for F[.]");
                (yylhs.value.ltl) = fnode::ff(); }
#line 2208 "parsetl.cc"
    break;

  case 176: // subformula: "F[.] operator" error "closing bracket" subformula
#line 924 "parsetl.yy"
              { error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "treating this F[.] as a simple F");
                (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2216 "parsetl.cc"
    break;

  case 177: // subformula: "F[.] operator" error "closing !]" subformula
#line 928 "parsetl.yy"
              { error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "treating this F[.!] as a simple F");
                (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2224 "parsetl.cc"
    break;

  case 178: // subformula: "always operator" subformula
#line 932 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::G, (yystack_[0].value.ltl)); }
#line 2230 "parsetl.cc"
    break;

  case 179: // subformula: "always operator" error
#line 934 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "always operator"); }
#line 2236 "parsetl.cc"
    break;

  case 180: // subformula: "G[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket" subformula
#line 937 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::And, (yystack_[4].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2242 "parsetl.cc"
    break;

  case 181: // subformula: "G[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing !]" subformula
#line 940 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X, op::And,
                                              (yystack_[4].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2249 "parsetl.cc"
    break;

  case 182: // subformula: "G[.] operator" "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing bracket" subformula
#line 944 "parsetl.yy"
            { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::And, (yystack_[3].value.num),
                                            fnode::unbounded(), (yystack_[0].value.ltl)); }
#line 2256 "parsetl.cc"
    break;

  case 183: // subformula: "G[.] operator" "number for square bracket operator" OP_SQBKT_SEP_unbounded "closing !]" subformula
#line 948 "parsetl.yy"
            { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X, op::And, (yystack_[3].value.num),
                                            fnode::unbounded(), (yystack_[0].value.ltl)); }
#line 2263 "parsetl.cc"
    break;

  case 184: // subformula: "G[.] operator" "number for square bracket operator" "closing bracket" subformula
#line 951 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::And, (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl));
                error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "G[n:m] expects two parameters");
              }
#line 2272 "parsetl.cc"
    break;

  case 185: // subformula: "G[.] operator" "number for square bracket operator" "closing !]" subformula
#line 957 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X, op::And,
                                              (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl));
                error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "G[n:m!] expects two parameters");
              }
#line 2282 "parsetl.cc"
    break;

  case 186: // subformula: "G[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing bracket" error
#line 964 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[5].location + yystack_[1].location, "G[.] operator"); }
#line 2288 "parsetl.cc"
    break;

  case 187: // subformula: "G[.] operator" "number for square bracket operator" "separator for square bracket operator" "number for square bracket operator" "closing !]" error
#line 967 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[5].location + yystack_[1].location, "G[.!] operator"); }
#line 2294 "parsetl.cc"
    break;

  case 188: // subformula: "G[.] operator" error_opt "end of formula"
#line 969 "parsetl.yy"
              { error_list.emplace_back(yylhs.location, "missing closing bracket for G[.]");
                (yylhs.value.ltl) = fnode::ff(); }
#line 2301 "parsetl.cc"
    break;

  case 189: // subformula: "G[.] operator" error "closing bracket" subformula
#line 972 "parsetl.yy"
              { error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "treating this G[.] as a simple G");
                (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2309 "parsetl.cc"
    break;

  case 190: // subformula: "G[.] operator" error "closing !]" subformula
#line 976 "parsetl.yy"
              { error_list.emplace_back(yystack_[3].location + yystack_[1].location,
                                        "treating this G[.!] as a simple G");
                (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2317 "parsetl.cc"
    break;

  case 191: // subformula: "next operator" subformula
#line 980 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::X, (yystack_[0].value.ltl)); }
#line 2323 "parsetl.cc"
    break;

  case 192: // subformula: "next operator" error
#line 982 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "next operator"); }
#line 2329 "parsetl.cc"
    break;

  case 193: // subformula: "strong next operator" subformula
#line 984 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::strong_X, (yystack_[0].value.ltl)); }
#line 2335 "parsetl.cc"
    break;

  case 194: // subformula: "strong next operator" error
#line 986 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "strong next operator"); }
#line 2341 "parsetl.cc"
    break;

  case 195: // subformula: "X[.] operator" "number for square bracket operator" "closing bracket" subformula
#line 988 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::X, op::Or, (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2347 "parsetl.cc"
    break;

  case 196: // subformula: "X[.] operator" "number for square bracket operator" "closing bracket" error
#line 990 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[3].location + yystack_[1].location, "X[.] operator"); }
#line 2353 "parsetl.cc"
    break;

  case 197: // subformula: "X[.] operator" error "closing bracket" subformula
#line 992 "parsetl.yy"
              { error_list.emplace_back(yylhs.location, "treating this X[.] as a simple X");
                (yylhs.value.ltl) = fnode::unop(op::X, (yystack_[0].value.ltl)); }
#line 2360 "parsetl.cc"
    break;

  case 198: // subformula: "X[.] operator" "closing !]" subformula
#line 995 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::strong_X, (yystack_[0].value.ltl)); }
#line 2366 "parsetl.cc"
    break;

  case 199: // subformula: "X[.] operator" "number for square bracket operator" "closing !]" subformula
#line 998 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::nested_unop_range(op::strong_X,
                                              op::Or, (yystack_[2].value.num), (yystack_[2].value.num), (yystack_[0].value.ltl)); }
#line 2373 "parsetl.cc"
    break;

  case 200: // subformula: "X[.] operator" error "closing !]" subformula
#line 1001 "parsetl.yy"
              { error_list.emplace_back(yylhs.location, "treating this X[.!] as a simple X[!]");
                (yylhs.value.ltl) = fnode::unop(op::strong_X, (yystack_[0].value.ltl)); }
#line 2380 "parsetl.cc"
    break;

  case 201: // subformula: "X[.] operator" error_opt "end of formula"
#line 1004 "parsetl.yy"
              { error_list.emplace_back(yylhs.location, "missing closing bracket for X[.]");
                (yylhs.value.ltl) = fnode::ff(); }
#line 2387 "parsetl.cc"
    break;

  case 202: // subformula: "not operator" subformula
#line 1007 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::Not, (yystack_[0].value.ltl)); }
#line 2393 "parsetl.cc"
    break;

  case 203: // subformula: "not operator" error
#line 1009 "parsetl.yy"
              { missing_right_op((yylhs.value.ltl), yystack_[1].location, "not operator"); }
#line 2399 "parsetl.cc"
    break;

  case 204: // subformula: bracedsere
#line 1011 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::Closure, (yystack_[0].value.ltl)); }
#line 2405 "parsetl.cc"
    break;

  case 205: // subformula: bracedsere "universal concat operator" subformula
#line 1013 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::UConcat, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2411 "parsetl.cc"
    break;

  case 206: // subformula: bracedsere parenthesedsubformula
#line 1015 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::UConcat, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2417 "parsetl.cc"
    break;

  case 207: // subformula: bracedsere "universal concat operator" error
#line 1017 "parsetl.yy"
              { missing_right_binop_hard((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
				    "universal overlapping concat operator"); }
#line 2424 "parsetl.cc"
    break;

  case 208: // subformula: bracedsere "existential concat operator" subformula
#line 1020 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::EConcat, (yystack_[2].value.ltl), (yystack_[0].value.ltl)); }
#line 2430 "parsetl.cc"
    break;

  case 209: // subformula: bracedsere "existential concat operator" error
#line 1022 "parsetl.yy"
              { missing_right_binop_hard((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
				    "existential overlapping concat operator");
	      }
#line 2438 "parsetl.cc"
    break;

  case 210: // subformula: bracedsere "universal non-overlapping concat operator" subformula
#line 1027 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::UConcat,
				  fnode::multop(op::Concat, {(yystack_[2].value.ltl), fnode::tt()}),
				  (yystack_[0].value.ltl)); }
#line 2446 "parsetl.cc"
    break;

  case 211: // subformula: bracedsere "universal non-overlapping concat operator" error
#line 1031 "parsetl.yy"
              { missing_right_binop_hard((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
				  "universal non-overlapping concat operator");
	      }
#line 2454 "parsetl.cc"
    break;

  case 212: // subformula: bracedsere "existential non-overlapping concat operator" subformula
#line 1036 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::EConcat,
				  fnode::multop(op::Concat, {(yystack_[2].value.ltl), fnode::tt()}),
				  (yystack_[0].value.ltl)); }
#line 2462 "parsetl.cc"
    break;

  case 213: // subformula: bracedsere "existential non-overlapping concat operator" error
#line 1040 "parsetl.yy"
              { missing_right_binop_hard((yylhs.value.ltl), (yystack_[2].value.ltl), yystack_[1].location,
				"existential non-overlapping concat operator");
	      }
#line 2470 "parsetl.cc"
    break;

  case 214: // subformula: "opening brace" sere "closing brace-bang"
#line 1045 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::EConcat, (yystack_[1].value.ltl), fnode::tt()); }
#line 2476 "parsetl.cc"
    break;

  case 215: // subformula: "{...}! block"
#line 1047 "parsetl.yy"
              {
		(yylhs.value.ltl) = try_recursive_parse(*(yystack_[0].value.str), yystack_[0].location, parse_environment,
					 debug_level(),
                                         parser_sere, error_list);
		delete (yystack_[0].value.str);
		if (!(yylhs.value.ltl))
		  YYERROR;
		(yylhs.value.ltl) = fnode::binop(op::EConcat, (yylhs.value.ltl), fnode::tt());
	      }
#line 2490 "parsetl.cc"
    break;

  case 216: // lbtformula: atomprop
#line 1057 "parsetl.yy"
            { (yylhs.value.ltl) = (yystack_[0].value.ltl); }
#line 2496 "parsetl.cc"
    break;

  case 217: // lbtformula: '!' lbtformula
#line 1059 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::Not, (yystack_[0].value.ltl)); }
#line 2502 "parsetl.cc"
    break;

  case 218: // lbtformula: '&' lbtformula lbtformula
#line 1061 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::And, {(yystack_[1].value.ltl), (yystack_[0].value.ltl)}); }
#line 2508 "parsetl.cc"
    break;

  case 219: // lbtformula: '|' lbtformula lbtformula
#line 1063 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::multop(op::Or, {(yystack_[1].value.ltl), (yystack_[0].value.ltl)}); }
#line 2514 "parsetl.cc"
    break;

  case 220: // lbtformula: '^' lbtformula lbtformula
#line 1065 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Xor, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2520 "parsetl.cc"
    break;

  case 221: // lbtformula: 'i' lbtformula lbtformula
#line 1067 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Implies, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2526 "parsetl.cc"
    break;

  case 222: // lbtformula: 'e' lbtformula lbtformula
#line 1069 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::Equiv, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2532 "parsetl.cc"
    break;

  case 223: // lbtformula: 'X' lbtformula
#line 1071 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::X, (yystack_[0].value.ltl)); }
#line 2538 "parsetl.cc"
    break;

  case 224: // lbtformula: 'F' lbtformula
#line 1073 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::F, (yystack_[0].value.ltl)); }
#line 2544 "parsetl.cc"
    break;

  case 225: // lbtformula: 'G' lbtformula
#line 1075 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::unop(op::G, (yystack_[0].value.ltl)); }
#line 2550 "parsetl.cc"
    break;

  case 226: // lbtformula: 'U' lbtformula lbtformula
#line 1077 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::U, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2556 "parsetl.cc"
    break;

  case 227: // lbtformula: 'V' lbtformula lbtformula
#line 1079 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::R, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2562 "parsetl.cc"
    break;

  case 228: // lbtformula: 'R' lbtformula lbtformula
#line 1081 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::R, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2568 "parsetl.cc"
    break;

  case 229: // lbtformula: 'W' lbtformula lbtformula
#line 1083 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::W, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2574 "parsetl.cc"
    break;

  case 230: // lbtformula: 'M' lbtformula lbtformula
#line 1085 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::binop(op::M, (yystack_[1].value.ltl), (yystack_[0].value.ltl)); }
#line 2580 "parsetl.cc"
    break;

  case 231: // lbtformula: 't'
#line 1087 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::tt(); }
#line 2586 "parsetl.cc"
    break;

  case 232: // lbtformula: 'f'
#line 1089 "parsetl.yy"
              { (yylhs.value.ltl) = fnode::ff(); }
#line 2592 "parsetl.cc"
    break;


#line 2596 "parsetl.cc"

            default:
              break;
            }
        }
#if YY_EXCEPTIONS
      catch (const syntax_error& yyexc)
        {
          YYCDEBUG << "Caught exception: " << yyexc.what() << '\n';
          error (yyexc);
          YYERROR;
        }
#endif // YY_EXCEPTIONS
      YY_SYMBOL_PRINT ("-> $$ =", yylhs);
      yypop_ (yylen);
      yylen = 0;

      // Shift the result of the reduction.
      yypush_ (YY_NULLPTR, YY_MOVE (yylhs));
    }
    goto yynewstate;


  /*--------------------------------------.
  | yyerrlab -- here on detecting error.  |
  `--------------------------------------*/
  yyerrlab:
    // If not already recovering from an error, report this error.
    if (!yyerrstatus_)
      {
        ++yynerrs_;
        context yyctx (*this, yyla);
        std::string msg = yysyntax_error_ (yyctx);
        error (yyla.location, YY_MOVE (msg));
      }


    yyerror_range[1].location = yyla.location;
    if (yyerrstatus_ == 3)
      {
        /* If just tried and failed to reuse lookahead token after an
           error, discard it.  */

        // Return failure if at end of input.
        if (yyla.kind () == symbol_kind::S_YYEOF)
          YYABORT;
        else if (!yyla.empty ())
          {
            yy_destroy_ ("Error: discarding", yyla);
            yyla.clear ();
          }
      }

    // Else will try to reuse lookahead token after shifting the error token.
    goto yyerrlab1;


  /*---------------------------------------------------.
  | yyerrorlab -- error raised explicitly by YYERROR.  |
  `---------------------------------------------------*/
  yyerrorlab:
    /* Pacify compilers when the user code never invokes YYERROR and
       the label yyerrorlab therefore never appears in user code.  */
    if (false)
      YYERROR;

    /* Do not reclaim the symbols of the rule whose action triggered
       this YYERROR.  */
    yypop_ (yylen);
    yylen = 0;
    YY_STACK_PRINT ();
    goto yyerrlab1;


  /*-------------------------------------------------------------.
  | yyerrlab1 -- common code for both syntax error and YYERROR.  |
  `-------------------------------------------------------------*/
  yyerrlab1:
    yyerrstatus_ = 3;   // Each real token shifted decrements this.
    // Pop stack until we find a state that shifts the error token.
    for (;;)
      {
        yyn = yypact_[+yystack_[0].state];
        if (!yy_pact_value_is_default_ (yyn))
          {
            yyn += symbol_kind::S_YYerror;
            if (0 <= yyn && yyn <= yylast_
                && yycheck_[yyn] == symbol_kind::S_YYerror)
              {
                yyn = yytable_[yyn];
                if (0 < yyn)
                  break;
              }
          }

        // Pop the current state because it cannot handle the error token.
        if (yystack_.size () == 1)
          YYABORT;

        yyerror_range[1].location = yystack_[0].location;
        yy_destroy_ ("Error: popping", yystack_[0]);
        yypop_ ();
        YY_STACK_PRINT ();
      }
    {
      stack_symbol_type error_token;

      yyerror_range[2].location = yyla.location;
      YYLLOC_DEFAULT (error_token.location, yyerror_range, 2);

      // Shift the error token.
      error_token.state = state_type (yyn);
      yypush_ ("Shifting", YY_MOVE (error_token));
    }
    goto yynewstate;


  /*-------------------------------------.
  | yyacceptlab -- YYACCEPT comes here.  |
  `-------------------------------------*/
  yyacceptlab:
    yyresult = 0;
    goto yyreturn;


  /*-----------------------------------.
  | yyabortlab -- YYABORT comes here.  |
  `-----------------------------------*/
  yyabortlab:
    yyresult = 1;
    goto yyreturn;


  /*-----------------------------------------------------.
  | yyreturn -- parsing is finished, return the result.  |
  `-----------------------------------------------------*/
  yyreturn:
    if (!yyla.empty ())
      yy_destroy_ ("Cleanup: discarding lookahead", yyla);

    /* Do not reclaim the symbols of the rule whose action triggered
       this YYABORT or YYACCEPT.  */
    yypop_ (yylen);
    YY_STACK_PRINT ();
    while (1 < yystack_.size ())
      {
        yy_destroy_ ("Cleanup: popping", yystack_[0]);
        yypop_ ();
      }

    return yyresult;
  }
#if YY_EXCEPTIONS
    catch (...)
      {
        YYCDEBUG << "Exception caught: cleaning lookahead and stack\n";
        // Do not try to display the values of the reclaimed symbols,
        // as their printers might throw an exception.
        if (!yyla.empty ())
          yy_destroy_ (YY_NULLPTR, yyla);

        while (1 < yystack_.size ())
          {
            yy_destroy_ (YY_NULLPTR, yystack_[0]);
            yypop_ ();
          }
        throw;
      }
#endif // YY_EXCEPTIONS
  }

  void
  parser::error (const syntax_error& yyexc)
  {
    error (yyexc.location, yyexc.what ());
  }

  /* Return YYSTR after stripping away unnecessary quotes and
     backslashes, so that it's suitable for yyerror.  The heuristic is
     that double-quoting is unnecessary unless the string contains an
     apostrophe, a comma, or backslash (other than backslash-backslash).
     YYSTR is taken from yytname.  */
  std::string
  parser::yytnamerr_ (const char *yystr)
  {
    if (*yystr == '"')
      {
        std::string yyr;
        char const *yyp = yystr;

        for (;;)
          switch (*++yyp)
            {
            case '\'':
            case ',':
              goto do_not_strip_quotes;

            case '\\':
              if (*++yyp != '\\')
                goto do_not_strip_quotes;
              else
                goto append;

            append:
            default:
              yyr += *yyp;
              break;

            case '"':
              return yyr;
            }
      do_not_strip_quotes: ;
      }

    return yystr;
  }

  std::string
  parser::symbol_name (symbol_kind_type yysymbol)
  {
    return yytnamerr_ (yytname_[yysymbol]);
  }



  // parser::context.
  parser::context::context (const parser& yyparser, const symbol_type& yyla)
    : yyparser_ (yyparser)
    , yyla_ (yyla)
  {}

  int
  parser::context::expected_tokens (symbol_kind_type yyarg[], int yyargn) const
  {
    // Actual number of expected tokens
    int yycount = 0;

    const int yyn = yypact_[+yyparser_.yystack_[0].state];
    if (!yy_pact_value_is_default_ (yyn))
      {
        /* Start YYX at -YYN if negative to avoid negative indexes in
           YYCHECK.  In other words, skip the first -YYN actions for
           this state because they are default actions.  */
        const int yyxbegin = yyn < 0 ? -yyn : 0;
        // Stay within bounds of both yycheck and yytname.
        const int yychecklim = yylast_ - yyn + 1;
        const int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
        for (int yyx = yyxbegin; yyx < yyxend; ++yyx)
          if (yycheck_[yyx + yyn] == yyx && yyx != symbol_kind::S_YYerror
              && !yy_table_value_is_error_ (yytable_[yyx + yyn]))
            {
              if (!yyarg)
                ++yycount;
              else if (yycount == yyargn)
                return 0;
              else
                yyarg[yycount++] = YY_CAST (symbol_kind_type, yyx);
            }
      }

    if (yyarg && yycount == 0 && 0 < yyargn)
      yyarg[0] = symbol_kind::S_YYEMPTY;
    return yycount;
  }






  int
  parser::yy_syntax_error_arguments_ (const context& yyctx,
                                                 symbol_kind_type yyarg[], int yyargn) const
  {
    /* There are many possibilities here to consider:
       - If this state is a consistent state with a default action, then
         the only way this function was invoked is if the default action
         is an error action.  In that case, don't check for expected
         tokens because there are none.
       - The only way there can be no lookahead present (in yyla) is
         if this state is a consistent state with a default action.
         Thus, detecting the absence of a lookahead is sufficient to
         determine that there is no unexpected or expected token to
         report.  In that case, just report a simple "syntax error".
       - Don't assume there isn't a lookahead just because this state is
         a consistent state with a default action.  There might have
         been a previous inconsistent state, consistent state with a
         non-default action, or user semantic action that manipulated
         yyla.  (However, yyla is currently not documented for users.)
       - Of course, the expected token list depends on states to have
         correct lookahead information, and it depends on the parser not
         to perform extra reductions after fetching a lookahead from the
         scanner and before detecting a syntax error.  Thus, state merging
         (from LALR or IELR) and default reductions corrupt the expected
         token list.  However, the list is correct for canonical LR with
         one exception: it will still contain any token that will not be
         accepted due to an error action in a later state.
    */

    if (!yyctx.lookahead ().empty ())
      {
        if (yyarg)
          yyarg[0] = yyctx.token ();
        int yyn = yyctx.expected_tokens (yyarg ? yyarg + 1 : yyarg, yyargn - 1);
        return yyn + 1;
      }
    return 0;
  }

  // Generate an error message.
  std::string
  parser::yysyntax_error_ (const context& yyctx) const
  {
    // Its maximum.
    enum { YYARGS_MAX = 5 };
    // Arguments of yyformat.
    symbol_kind_type yyarg[YYARGS_MAX];
    int yycount = yy_syntax_error_arguments_ (yyctx, yyarg, YYARGS_MAX);

    char const* yyformat = YY_NULLPTR;
    switch (yycount)
      {
#define YYCASE_(N, S)                         \
        case N:                               \
          yyformat = S;                       \
        break
      default: // Avoid compiler warnings.
        YYCASE_ (0, YY_("syntax error"));
        YYCASE_ (1, YY_("syntax error, unexpected %s"));
        YYCASE_ (2, YY_("syntax error, unexpected %s, expecting %s"));
        YYCASE_ (3, YY_("syntax error, unexpected %s, expecting %s or %s"));
        YYCASE_ (4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
        YYCASE_ (5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
#undef YYCASE_
      }

    std::string yyres;
    // Argument number.
    std::ptrdiff_t yyi = 0;
    for (char const* yyp = yyformat; *yyp; ++yyp)
      if (yyp[0] == '%' && yyp[1] == 's' && yyi < yycount)
        {
          yyres += symbol_name (yyarg[yyi++]);
          ++yyp;
        }
      else
        yyres += *yyp;
    return yyres;
  }


  const signed char parser::yypact_ninf_ = -86;

  const signed char parser::yytable_ninf_ = -25;

  const short
  parser::yypact_[] =
  {
     237,   571,   407,   608,   256,    38,   -56,  1298,   -86,   -86,
     -86,   644,  1335,  1367,  1399,  1431,  1463,    21,    47,   125,
     -86,   -86,   -86,   -86,   -86,   -86,   -42,   -86,   146,   -86,
      13,  2258,  2258,  2258,  2258,  2258,  2258,  2258,  2258,  2258,
    2258,  2258,  2258,  2258,  2258,   -86,   -86,   -86,   -86,   -86,
       1,   680,   -86,   644,  1147,   -86,   -86,   -86,    89,    43,
     716,   124,   -86,   -86,   -86,   -86,   -86,   -86,   752,   -86,
     551,   -86,   440,   -86,  1097,   -86,   -86,   -86,   217,   -86,
     -86,    31,  1196,    -1,   486,   -86,   -86,   -86,   -86,   -86,
     -86,   -86,   -86,   -86,   -86,    -2,  2228,    20,    -5,   166,
      81,    14,   177,   225,    40,   -86,   -86,  1495,  1527,  1559,
    1591,   -86,  1623,  1655,  1687,  1719,  1751,  1783,  1815,  1847,
    1879,  1911,  1943,   -86,   -86,   -86,  2258,  2258,  2258,  2258,
    2258,   -86,   -86,   -86,  2258,  2258,  2258,  2258,  2258,   -86,
     -86,    35,  1228,   497,   -86,    15,    86,   210,   -86,    74,
      88,   -86,  1147,   -86,  2329,   109,    97,   -86,   -86,  2329,
     788,   824,   860,   896,   932,   968,   -86,   -86,   182,   202,
     343,  1004,  1040,   -86,  1076,   -86,   -86,   -86,   -86,   -86,
    1112,    36,  1222,   -86,   -86,  2110,  2115,  2139,  2144,  2168,
    2173,  2178,   -86,   -86,   -86,   -86,    41,   -86,   -86,   -86,
     -86,    29,   -86,   -86,   -86,  2228,  2228,   -86,  1975,  2228,
     -86,  2228,  2228,  2228,  2228,   272,   277,   -86,  2228,  2228,
    2228,  2228,   292,   298,   -86,   -86,   415,   -86,   415,   -86,
     415,   -86,   415,   -86,   282,   -86,   126,   -86,   268,   -86,
     268,   -86,   415,   -86,   415,   -86,   254,   -86,   254,   -86,
     254,   -86,   254,   -86,   254,   -86,   -86,   -86,   -86,   -86,
     -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,
     -86,   317,   114,   142,   -86,   -86,   -86,  1278,   -86,   -86,
     -86,  1153,   -86,  2175,   -86,  1237,   -86,  1237,   -86,  2329,
     -86,  2329,   150,   110,   -86,   155,   143,   -86,   168,   -86,
     133,   322,   174,   181,   -86,  2231,   -86,  2280,   -86,  2329,
     -86,  2329,   -86,   -86,    65,   -86,   -86,   -86,    63,   -86,
     140,   -86,    22,   -86,    22,   -86,   614,   -86,   614,   -86,
     -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,
     -86,   -86,   -86,   -86,   300,  2228,  2228,   -86,   -86,   -86,
     -86,   330,  2228,  2228,   227,   -86,   -86,   -86,   -86,   -86,
     -86,   -86,   -86,   -86,   331,   239,   241,   -86,   -86,   -86,
     -86,  2007,  2039,   -86,   -86,  2071,  2103,   -86,   -86,   -86,
     246,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,   -86,
     -86,   -86
  };

  const unsigned char
  parser::yydefact_[] =
  {
       0,     0,     0,     0,     0,     0,     0,     0,   110,   109,
     215,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      59,    63,    64,    18,     5,     3,    60,   141,   204,   142,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,   231,   232,    17,    15,   216,
       0,     0,    68,     0,     0,    39,    40,    42,     0,     0,
       0,     0,    57,    58,    13,    11,    41,    91,     0,    65,
       0,    67,     0,   118,     0,     9,     7,   117,     0,     1,
      19,     0,     0,     0,     0,   166,   165,   179,   178,   192,
     191,   194,   193,   203,   202,    25,     0,     0,     0,    25,
       0,     0,    25,     0,     0,    62,    61,     0,     0,     0,
       0,   206,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     2,     4,   217,     0,     0,     0,     0,
       0,   223,   224,   225,     0,     0,     0,     0,     0,    14,
      16,     0,     0,     0,    66,    25,     0,    20,    23,     0,
       0,    43,     0,    84,    83,    25,     0,    54,    88,    87,
       0,     0,     0,     0,     0,     0,    46,    47,     0,     0,
       0,     0,     0,    10,     0,    12,    95,    92,    93,    94,
       0,     0,     0,   140,   139,     0,     0,     0,     0,     0,
       0,     0,     6,     8,   113,   116,     0,   111,   114,   105,
     108,     0,   103,   214,   106,     0,     0,   198,     0,     0,
     201,     0,     0,     0,     0,    20,     0,   175,     0,     0,
       0,     0,    20,     0,   188,   207,   205,   209,   208,   211,
     210,   213,   212,   150,   149,   152,   151,   144,   143,   146,
     145,   154,   153,   156,   155,   158,   157,   160,   159,   162,
     161,   164,   163,   148,   147,   218,   219,   220,   221,   222,
     226,   227,   228,   229,   230,    70,    72,    69,    71,    44,
      30,    20,     0,     0,    21,    29,    45,     0,    55,    56,
      78,    77,    97,    96,    74,    73,    76,    75,    99,    98,
     101,   100,    25,     0,    48,    25,     0,    51,    25,    35,
       0,    20,     0,     0,    80,    79,    82,    81,    86,    85,
      90,    89,   121,   124,     0,   119,   122,   132,   131,   134,
     133,   126,   125,   128,   127,   136,   135,   138,   137,   130,
     129,   112,   115,   104,   107,   197,   200,   196,   195,   199,
     176,   177,   167,   168,     0,     0,     0,   189,   190,   184,
     185,     0,     0,     0,     0,    27,    28,   102,    49,    50,
      52,    53,    37,    36,    20,     0,     0,    34,    38,   120,
     123,     0,     0,   171,   172,     0,     0,   182,   183,    26,
       0,    32,    33,   173,   169,   174,   170,   186,   180,   187,
     181,    31
  };

  const short
  parser::yypgoto_[] =
  {
     -86,   -86,    73,    17,   -85,   -86,     8,   -48,   -86,   -86,
     -60,   -86,   -86,   -25,   316,     0,   242,   219,   102,   -49,
      -7,   291
  };

  const unsigned char
  parser::yydefgoto_[] =
  {
       0,     5,    24,    25,   148,   149,    98,   151,   176,    66,
      67,   178,   179,    68,    26,    27,    70,    28,    29,    78,
      30,    50
  };

  const short
  parser::yytable_[] =
  {
      82,    80,     6,    69,    77,    86,    88,    90,    92,    94,
     177,    69,   199,   157,     6,   216,   105,   106,   223,    48,
      65,    76,    95,   182,   177,   184,   101,   104,   112,   113,
     114,   115,   116,   117,   118,   119,   120,   121,    79,   194,
     205,   206,   333,   265,   312,   180,   122,   124,    99,   331,
     152,    69,   210,    69,    69,   191,   200,   269,   139,   180,
      69,   272,   208,   209,    96,    97,   150,   140,    69,   156,
     123,   217,    77,   369,    77,    47,    64,    75,   -24,   186,
     187,   188,   177,   177,   177,   302,   334,   175,   195,   207,
     145,   100,   266,   313,   177,   193,   191,   224,   332,   177,
     226,   228,   230,   232,   -24,   234,   236,   238,   240,   242,
     244,   246,   248,   250,   252,   254,   275,   180,   180,   180,
     294,   297,   370,   213,   214,   155,   102,   215,   270,   180,
     111,   -22,   271,   146,   180,   147,   318,   320,   322,   324,
     326,   328,   330,   114,   115,   276,   -24,   118,   119,   120,
     121,   278,    69,     7,   279,     8,   355,   187,   188,   122,
      69,    69,    69,    69,    69,    69,   -22,   359,   146,   103,
     147,    69,    69,   191,    69,   363,   293,   296,   303,   364,
      69,   -24,   -24,   292,   356,    77,    77,    77,    77,    77,
      77,    77,   358,   107,   108,   109,   110,   360,   335,   336,
     361,   338,   339,   295,   340,   341,   342,   343,   211,   212,
     362,   347,   348,   349,   350,   365,   367,   177,     6,   218,
     219,   177,    71,   177,   -22,   177,   146,   177,   147,   177,
      71,   177,   185,   186,   187,   188,   189,   190,   368,   -24,
       1,     2,     3,     4,   -22,   177,   146,   177,   147,   177,
     191,   177,   180,    84,   273,   274,   180,     6,   180,   -24,
     180,     0,   180,    72,   180,    73,   180,   220,   221,   379,
      71,   222,    71,    71,   192,   118,   119,   120,   121,    71,
     180,   381,   180,   382,   180,    74,   180,    71,   391,   118,
     119,   120,   121,   142,     0,   143,   144,     0,   113,   114,
     115,   122,   154,   118,   119,   120,   121,     0,    20,     0,
     159,    21,    22,    23,     0,   122,   344,   274,    49,   345,
     346,     0,   125,   126,   127,   128,   129,   130,   131,   132,
     133,   134,   135,   136,   137,   138,   351,   274,   373,   374,
     352,   353,   371,   372,   298,   377,   378,    49,    49,    49,
      49,    49,    49,    49,    49,    49,    49,    49,    49,    49,
      49,   354,   274,     0,   384,   386,   366,   274,   388,   390,
       0,    71,   375,   376,     0,   380,   274,     0,     0,    71,
      71,    71,    71,    71,    71,   299,     0,   300,     0,   301,
      71,    71,     0,    71,   277,     0,     0,     0,     0,    71,
     -24,     0,   281,   283,   285,   287,   289,   291,     6,     0,
       0,     0,     0,   305,   307,     0,   309,   255,   256,   257,
     258,   259,   311,     0,     0,   260,   261,   262,   263,   264,
     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
       0,   181,    49,    49,    49,    49,    49,    72,   122,    73,
      49,    49,    49,    49,    49,     0,     0,     0,     0,    20,
       0,     0,     0,     0,    23,     0,     0,     0,     0,    74,
       0,    31,    32,    33,    34,    35,    36,    37,    38,    39,
      40,    41,    42,    43,    44,    45,    46,   201,     0,     0,
       0,     0,    20,     0,     0,    21,    22,     0,   201,   202,
     203,   160,   161,   162,   163,   164,   165,     0,     0,     0,
     202,     0,   160,   161,   162,   163,   164,   165,     0,    55,
      56,   166,    57,   167,    58,   168,   169,   170,     0,     0,
      55,    56,   166,    57,   167,    58,   168,   169,   170,   171,
     172,     0,     0,   204,     0,     0,   174,    61,    62,    63,
     171,   172,     6,     0,   204,     0,     0,   174,    61,    62,
      63,     0,     0,     0,     0,     0,   160,   161,   162,   163,
     164,   165,     6,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,    55,    56,   166,    57,   167,    58,
     168,   169,   170,     0,     0,     0,    12,    13,    14,    15,
      16,    17,    18,    19,   171,   172,     0,     0,   173,     6,
       0,   174,    61,    62,    63,    51,     0,    52,     9,     0,
      53,     0,     0,    20,     0,     0,    21,    22,    23,   185,
     186,   187,   188,   189,   190,     0,     0,    54,     0,     0,
       0,    55,    56,     0,    57,    83,    58,   191,     0,     0,
       0,    51,     0,    52,     9,     0,    53,     0,     0,    59,
      20,     0,     0,    21,    22,    23,     0,     0,    60,    61,
      62,    63,     0,    54,     0,     0,     0,    55,    56,     0,
      57,   141,    58,     0,     0,     0,     0,    51,     0,    52,
       9,     0,    53,     0,     0,    59,    20,     0,     0,    21,
      22,     0,     0,     0,    60,    61,    62,    63,     0,    54,
       0,     0,     0,    55,    56,     0,    57,   153,    58,     0,
       0,     0,     0,    51,     0,    52,     9,     0,    53,     0,
       0,    59,    20,     0,     0,    21,    22,     0,     0,     0,
      60,    61,    62,    63,     0,    54,     0,     0,     0,    55,
      56,     0,    57,   158,    58,     0,     0,     0,     0,    51,
       0,    52,     9,     0,    53,     0,     0,    59,    20,     0,
       0,    21,    22,     0,     0,     0,    60,    61,    62,    63,
       0,    54,     0,     0,     0,    55,    56,     0,    57,   280,
      58,     0,     0,     0,     0,    51,     0,    52,     9,     0,
      53,     0,     0,    59,    20,     0,     0,    21,    22,     0,
       0,     0,    60,    61,    62,    63,     0,    54,     0,     0,
       0,    55,    56,     0,    57,   282,    58,     0,     0,     0,
       0,    51,     0,    52,     9,     0,    53,     0,     0,    59,
      20,     0,     0,    21,    22,     0,     0,     0,    60,    61,
      62,    63,     0,    54,     0,     0,     0,    55,    56,     0,
      57,   284,    58,     0,     0,     0,     0,    51,     0,    52,
       9,     0,    53,     0,     0,    59,    20,     0,     0,    21,
      22,     0,     0,     0,    60,    61,    62,    63,     0,    54,
       0,     0,     0,    55,    56,     0,    57,   286,    58,     0,
       0,     0,     0,    51,     0,    52,     9,     0,    53,     0,
       0,    59,    20,     0,     0,    21,    22,     0,     0,     0,
      60,    61,    62,    63,     0,    54,     0,     0,     0,    55,
      56,     0,    57,   288,    58,     0,     0,     0,     0,    51,
       0,    52,     9,     0,    53,     0,     0,    59,    20,     0,
       0,    21,    22,     0,     0,     0,    60,    61,    62,    63,
       0,    54,     0,     0,     0,    55,    56,     0,    57,   290,
      58,     0,     0,     0,     0,    51,     0,    52,     9,     0,
      53,     0,     0,    59,    20,     0,     0,    21,    22,     0,
       0,     0,    60,    61,    62,    63,     0,    54,     0,     0,
       0,    55,    56,     0,    57,   304,    58,     0,     0,     0,
       0,    51,     0,    52,     9,     0,    53,     0,     0,    59,
      20,     0,     0,    21,    22,     0,     0,     0,    60,    61,
      62,    63,     0,    54,     0,     0,     0,    55,    56,     0,
      57,   306,    58,     0,     0,     0,     0,    51,     0,    52,
       9,     0,    53,     0,     0,    59,    20,     0,     0,    21,
      22,     0,     0,     0,    60,    61,    62,    63,     0,    54,
       0,     0,     0,    55,    56,     0,    57,   308,    58,     0,
       0,     0,     0,    51,     0,    52,     9,     0,    53,     0,
       0,    59,    20,     0,     0,    21,    22,     0,   183,     0,
      60,    61,    62,    63,    72,    54,    73,     0,     0,    55,
      56,     0,    57,   310,    58,     0,     0,     0,     0,    51,
       0,    52,     9,     0,    53,     0,    74,    59,    20,     0,
       0,    21,    22,     0,     0,     0,    60,    61,    62,    63,
       0,    54,     0,     0,     0,    55,    56,     0,    57,    20,
      58,     0,    21,    22,    51,     0,    52,     9,     0,    53,
       0,     0,     0,    59,    20,     0,     0,    21,    22,   161,
     162,   163,    60,    61,    62,    63,    54,     0,     0,     0,
      55,    56,     0,    57,     0,    58,    55,    56,   166,    57,
     167,    58,   168,   169,   170,     0,     0,   196,    59,    20,
       0,     0,    21,    22,   197,     0,     0,    60,    61,    62,
      63,   112,   113,   114,   115,   116,   117,   118,   119,   120,
     121,     0,     0,   314,     0,     0,     0,     0,     0,   122,
     315,     0,     0,     0,     0,     0,   267,   185,   186,   187,
     188,   189,   190,   160,   161,   162,   163,   164,   165,     0,
       0,     0,     0,   198,     0,   191,     0,     0,     0,     0,
       0,    55,    56,   166,    57,   167,    58,   168,   169,   170,
      55,    56,   166,    57,   167,    58,   168,   169,   170,   316,
       0,   171,   172,     0,     0,   268,   357,     0,   174,    61,
      62,    63,     0,   160,   161,   162,   163,   164,   165,    81,
       0,     0,     0,     0,     0,     7,     0,     8,     9,    10,
      11,    55,    56,   166,    57,   167,    58,   168,   169,   170,
       0,     0,     0,    12,    13,    14,    15,    16,    17,    18,
      19,   171,   172,     0,     0,     0,    85,     0,   174,    61,
      62,    63,     7,     0,     8,     9,    10,    11,     0,     0,
      20,     0,     0,    21,    22,     0,     0,     0,     0,     0,
      12,    13,    14,    15,    16,    17,    18,    19,    87,     0,
       0,     0,     0,     0,     7,     0,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,    20,     0,     0,
      21,    22,    12,    13,    14,    15,    16,    17,    18,    19,
      89,     0,     0,     0,     0,     0,     7,     0,     8,     9,
      10,    11,     0,     0,     0,     0,     0,     0,     0,    20,
       0,     0,    21,    22,    12,    13,    14,    15,    16,    17,
      18,    19,    91,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
       0,    20,     0,     0,    21,    22,    12,    13,    14,    15,
      16,    17,    18,    19,    93,     0,     0,     0,     0,     0,
       7,     0,     8,     9,    10,    11,     0,     0,     0,     0,
       0,     0,     0,    20,     0,     0,    21,    22,    12,    13,
      14,    15,    16,    17,    18,    19,   225,     0,     0,     0,
       0,     0,     7,     0,     8,     9,    10,    11,     0,     0,
       0,     0,     0,     0,     0,    20,     0,     0,    21,    22,
      12,    13,    14,    15,    16,    17,    18,    19,   227,     0,
       0,     0,     0,     0,     7,     0,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,    20,     0,     0,
      21,    22,    12,    13,    14,    15,    16,    17,    18,    19,
     229,     0,     0,     0,     0,     0,     7,     0,     8,     9,
      10,    11,     0,     0,     0,     0,     0,     0,     0,    20,
       0,     0,    21,    22,    12,    13,    14,    15,    16,    17,
      18,    19,   231,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
       0,    20,     0,     0,    21,    22,    12,    13,    14,    15,
      16,    17,    18,    19,   233,     0,     0,     0,     0,     0,
       7,     0,     8,     9,    10,    11,     0,     0,     0,     0,
       0,     0,     0,    20,     0,     0,    21,    22,    12,    13,
      14,    15,    16,    17,    18,    19,   235,     0,     0,     0,
       0,     0,     7,     0,     8,     9,    10,    11,     0,     0,
       0,     0,     0,     0,     0,    20,     0,     0,    21,    22,
      12,    13,    14,    15,    16,    17,    18,    19,   237,     0,
       0,     0,     0,     0,     7,     0,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,    20,     0,     0,
      21,    22,    12,    13,    14,    15,    16,    17,    18,    19,
     239,     0,     0,     0,     0,     0,     7,     0,     8,     9,
      10,    11,     0,     0,     0,     0,     0,     0,     0,    20,
       0,     0,    21,    22,    12,    13,    14,    15,    16,    17,
      18,    19,   241,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
       0,    20,     0,     0,    21,    22,    12,    13,    14,    15,
      16,    17,    18,    19,   243,     0,     0,     0,     0,     0,
       7,     0,     8,     9,    10,    11,     0,     0,     0,     0,
       0,     0,     0,    20,     0,     0,    21,    22,    12,    13,
      14,    15,    16,    17,    18,    19,   245,     0,     0,     0,
       0,     0,     7,     0,     8,     9,    10,    11,     0,     0,
       0,     0,     0,     0,     0,    20,     0,     0,    21,    22,
      12,    13,    14,    15,    16,    17,    18,    19,   247,     0,
       0,     0,     0,     0,     7,     0,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,    20,     0,     0,
      21,    22,    12,    13,    14,    15,    16,    17,    18,    19,
     249,     0,     0,     0,     0,     0,     7,     0,     8,     9,
      10,    11,     0,     0,     0,     0,     0,     0,     0,    20,
       0,     0,    21,    22,    12,    13,    14,    15,    16,    17,
      18,    19,   251,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
       0,    20,     0,     0,    21,    22,    12,    13,    14,    15,
      16,    17,    18,    19,   253,     0,     0,     0,     0,     0,
       7,     0,     8,     9,    10,    11,     0,     0,     0,     0,
       0,     0,     0,    20,     0,     0,    21,    22,    12,    13,
      14,    15,    16,    17,    18,    19,   337,     0,     0,     0,
       0,     0,     7,     0,     8,     9,    10,    11,     0,     0,
       0,     0,     0,     0,     0,    20,     0,     0,    21,    22,
      12,    13,    14,    15,    16,    17,    18,    19,   383,     0,
       0,     0,     0,     0,     7,     0,     8,     9,    10,    11,
       0,     0,     0,     0,     0,     0,     0,    20,     0,     0,
      21,    22,    12,    13,    14,    15,    16,    17,    18,    19,
     385,     0,     0,     0,     0,     0,     7,     0,     8,     9,
      10,    11,     0,     0,     0,     0,     0,     0,     0,    20,
       0,     0,    21,    22,    12,    13,    14,    15,    16,    17,
      18,    19,   387,     0,     0,     0,     0,     0,     7,     0,
       8,     9,    10,    11,     0,     0,     0,     0,     0,     0,
       0,    20,     0,     0,    21,    22,    12,    13,    14,    15,
      16,    17,    18,    19,   389,     0,     0,     0,     0,     0,
       7,   317,     8,     9,    10,    11,   319,    72,     0,    73,
       0,     0,    72,    20,    73,     0,    21,    22,    12,    13,
      14,    15,    16,    17,    18,    19,     0,     0,     0,    74,
     321,     0,     0,     0,    74,   323,    72,     0,    73,     0,
       0,    72,     0,    73,     0,    20,     0,     0,    21,    22,
       0,     0,    20,     0,     0,    21,    22,    20,    74,   325,
      21,    22,     0,    74,   327,    72,     0,    73,     0,   329,
      72,     0,    73,     0,     0,    72,     0,    73,     0,     0,
       0,    20,   162,   163,    21,    22,    20,    74,     0,    21,
      22,     0,    74,     0,     0,     0,     0,    74,    55,    56,
     166,    57,   167,    58,   168,   169,   170,     0,     0,     0,
      20,     0,     0,    21,    22,    20,     0,     0,    21,    22,
      20,     0,     0,    21,    22,     7,     0,     8,     9,    10,
      11,     0,     0,     0,     0,     0,   160,   161,   162,   163,
     164,   165,     0,    12,    13,    14,    15,    16,    17,    18,
      19,     0,     0,     0,    55,    56,   166,    57,   167,    58,
     168,   169,   170,     0,     0,     0,     0,     0,     0,     0,
      20,     0,     0,    21,    22,   172,     0,     0,     0,     0,
       0,   174,    61,    62,    63,   160,   161,   162,   163,   164,
     165,     0,     0,     0,     0,     0,     0,     0,     0,     0,
      20,     0,     0,    55,    56,   166,    57,   167,    58,   168,
     169,   170,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    42,    43,    44,    45,    46,     0,     0,
     174,    61,    62,    63,   160,   161,   162,   163,   164,   165,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,    55,    56,   166,    57,   167,    58,   168,   169,
     170
  };

  const short
  parser::yycheck_[] =
  {
       7,    57,     1,     3,     4,    12,    13,    14,    15,    16,
      70,    11,    13,    61,     1,   100,    58,    59,   103,     2,
       3,     4,     1,    72,    84,    74,    18,    19,    15,    16,
      17,    18,    19,    20,    21,    22,    23,    24,     0,     8,
      42,    43,    13,     8,     8,    70,    33,    30,     1,     8,
       7,    51,    57,    53,    54,    33,    57,    42,    57,    84,
      60,   146,    42,    43,    43,    44,    58,    50,    68,    61,
      57,    57,    72,     8,    74,     2,     3,     4,    57,    16,
      17,    18,   142,   143,   144,   170,    57,    70,    57,    96,
       1,    44,    57,    57,   154,    78,    33,    57,    57,   159,
     107,   108,   109,   110,    57,   112,   113,   114,   115,   116,
     117,   118,   119,   120,   121,   122,    42,   142,   143,   144,
     168,   169,    57,    42,    43,     1,     1,    46,    42,   154,
      28,    42,    46,    44,   159,    46,   185,   186,   187,   188,
     189,   190,   191,    17,    18,    57,    57,    21,    22,    23,
      24,    42,   152,     7,    57,     9,    42,    17,    18,    33,
     160,   161,   162,   163,   164,   165,    42,    57,    44,    44,
      46,   171,   172,    33,   174,    42,   168,   169,   170,    46,
     180,    57,    57,     1,    42,   185,   186,   187,   188,   189,
     190,   191,    42,    47,    48,    49,    50,    42,   205,   206,
      57,   208,   209,     1,   211,   212,   213,   214,    42,    43,
      42,   218,   219,   220,   221,   300,    42,   277,     1,    42,
      43,   281,     3,   283,    42,   285,    44,   287,    46,   289,
      11,   291,    15,    16,    17,    18,    19,    20,    57,    57,
       3,     4,     5,     6,    42,   305,    44,   307,    46,   309,
      33,   311,   277,    11,    44,    45,   281,     1,   283,    57,
     285,    -1,   287,     7,   289,     9,   291,    42,    43,    42,
      51,    46,    53,    54,    57,    21,    22,    23,    24,    60,
     305,    42,   307,    42,   309,    29,   311,    68,    42,    21,
      22,    23,    24,    51,    -1,    53,    54,    -1,    16,    17,
      18,    33,    60,    21,    22,    23,    24,    -1,    52,    -1,
      68,    55,    56,    57,    -1,    33,    44,    45,     2,    42,
      43,    -1,    31,    32,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    42,    43,    44,    44,    45,   345,   346,
      42,    43,    42,    43,     1,   352,   353,    31,    32,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    42,    43,
      44,    44,    45,    -1,   371,   372,    44,    45,   375,   376,
      -1,   152,    42,    43,    -1,    44,    45,    -1,    -1,   160,
     161,   162,   163,   164,   165,    42,    -1,    44,    -1,    46,
     171,   172,    -1,   174,   152,    -1,    -1,    -1,    -1,   180,
      57,    -1,   160,   161,   162,   163,   164,   165,     1,    -1,
      -1,    -1,    -1,   171,   172,    -1,   174,   126,   127,   128,
     129,   130,   180,    -1,    -1,   134,   135,   136,   137,   138,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      -1,     1,   126,   127,   128,   129,   130,     7,    33,     9,
     134,   135,   136,   137,   138,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    -1,    -1,    57,    -1,    -1,    -1,    -1,    29,
      -1,    64,    65,    66,    67,    68,    69,    70,    71,    72,
      73,    74,    75,    76,    77,    78,    79,     1,    -1,    -1,
      -1,    -1,    52,    -1,    -1,    55,    56,    -1,     1,    13,
      14,    15,    16,    17,    18,    19,    20,    -1,    -1,    -1,
      13,    -1,    15,    16,    17,    18,    19,    20,    -1,    33,
      34,    35,    36,    37,    38,    39,    40,    41,    -1,    -1,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    53,
      54,    -1,    -1,    57,    -1,    -1,    60,    61,    62,    63,
      53,    54,     1,    -1,    57,    -1,    -1,    60,    61,    62,
      63,    -1,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
      19,    20,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    -1,    -1,    25,    26,    27,    28,
      29,    30,    31,    32,    53,    54,    -1,    -1,    57,     1,
      -1,    60,    61,    62,    63,     7,    -1,     9,    10,    -1,
      12,    -1,    -1,    52,    -1,    -1,    55,    56,    57,    15,
      16,    17,    18,    19,    20,    -1,    -1,    29,    -1,    -1,
      -1,    33,    34,    -1,    36,     1,    38,    33,    -1,    -1,
      -1,     7,    -1,     9,    10,    -1,    12,    -1,    -1,    51,
      52,    -1,    -1,    55,    56,    57,    -1,    -1,    60,    61,
      62,    63,    -1,    29,    -1,    -1,    -1,    33,    34,    -1,
      36,     1,    38,    -1,    -1,    -1,    -1,     7,    -1,     9,
      10,    -1,    12,    -1,    -1,    51,    52,    -1,    -1,    55,
      56,    -1,    -1,    -1,    60,    61,    62,    63,    -1,    29,
      -1,    -1,    -1,    33,    34,    -1,    36,     1,    38,    -1,
      -1,    -1,    -1,     7,    -1,     9,    10,    -1,    12,    -1,
      -1,    51,    52,    -1,    -1,    55,    56,    -1,    -1,    -1,
      60,    61,    62,    63,    -1,    29,    -1,    -1,    -1,    33,
      34,    -1,    36,     1,    38,    -1,    -1,    -1,    -1,     7,
      -1,     9,    10,    -1,    12,    -1,    -1,    51,    52,    -1,
      -1,    55,    56,    -1,    -1,    -1,    60,    61,    62,    63,
      -1,    29,    -1,    -1,    -1,    33,    34,    -1,    36,     1,
      38,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,    -1,
      12,    -1,    -1,    51,    52,    -1,    -1,    55,    56,    -1,
      -1,    -1,    60,    61,    62,    63,    -1,    29,    -1,    -1,
      -1,    33,    34,    -1,    36,     1,    38,    -1,    -1,    -1,
      -1,     7,    -1,     9,    10,    -1,    12,    -1,    -1,    51,
      52,    -1,    -1,    55,    56,    -1,    -1,    -1,    60,    61,
      62,    63,    -1,    29,    -1,    -1,    -1,    33,    34,    -1,
      36,     1,    38,    -1,    -1,    -1,    -1,     7,    -1,     9,
      10,    -1,    12,    -1,    -1,    51,    52,    -1,    -1,    55,
      56,    -1,    -1,    -1,    60,    61,    62,    63,    -1,    29,
      -1,    -1,    -1,    33,    34,    -1,    36,     1,    38,    -1,
      -1,    -1,    -1,     7,    -1,     9,    10,    -1,    12,    -1,
      -1,    51,    52,    -1,    -1,    55,    56,    -1,    -1,    -1,
      60,    61,    62,    63,    -1,    29,    -1,    -1,    -1,    33,
      34,    -1,    36,     1,    38,    -1,    -1,    -1,    -1,     7,
      -1,     9,    10,    -1,    12,    -1,    -1,    51,    52,    -1,
      -1,    55,    56,    -1,    -1,    -1,    60,    61,    62,    63,
      -1,    29,    -1,    -1,    -1,    33,    34,    -1,    36,     1,
      38,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,    -1,
      12,    -1,    -1,    51,    52,    -1,    -1,    55,    56,    -1,
      -1,    -1,    60,    61,    62,    63,    -1,    29,    -1,    -1,
      -1,    33,    34,    -1,    36,     1,    38,    -1,    -1,    -1,
      -1,     7,    -1,     9,    10,    -1,    12,    -1,    -1,    51,
      52,    -1,    -1,    55,    56,    -1,    -1,    -1,    60,    61,
      62,    63,    -1,    29,    -1,    -1,    -1,    33,    34,    -1,
      36,     1,    38,    -1,    -1,    -1,    -1,     7,    -1,     9,
      10,    -1,    12,    -1,    -1,    51,    52,    -1,    -1,    55,
      56,    -1,    -1,    -1,    60,    61,    62,    63,    -1,    29,
      -1,    -1,    -1,    33,    34,    -1,    36,     1,    38,    -1,
      -1,    -1,    -1,     7,    -1,     9,    10,    -1,    12,    -1,
      -1,    51,    52,    -1,    -1,    55,    56,    -1,     1,    -1,
      60,    61,    62,    63,     7,    29,     9,    -1,    -1,    33,
      34,    -1,    36,     1,    38,    -1,    -1,    -1,    -1,     7,
      -1,     9,    10,    -1,    12,    -1,    29,    51,    52,    -1,
      -1,    55,    56,    -1,    -1,    -1,    60,    61,    62,    63,
      -1,    29,    -1,    -1,    -1,    33,    34,    -1,    36,    52,
      38,    -1,    55,    56,     7,    -1,     9,    10,    -1,    12,
      -1,    -1,    -1,    51,    52,    -1,    -1,    55,    56,    16,
      17,    18,    60,    61,    62,    63,    29,    -1,    -1,    -1,
      33,    34,    -1,    36,    -1,    38,    33,    34,    35,    36,
      37,    38,    39,    40,    41,    -1,    -1,     1,    51,    52,
      -1,    -1,    55,    56,     8,    -1,    -1,    60,    61,    62,
      63,    15,    16,    17,    18,    19,    20,    21,    22,    23,
      24,    -1,    -1,     1,    -1,    -1,    -1,    -1,    -1,    33,
       8,    -1,    -1,    -1,    -1,    -1,     8,    15,    16,    17,
      18,    19,    20,    15,    16,    17,    18,    19,    20,    -1,
      -1,    -1,    -1,    57,    -1,    33,    -1,    -1,    -1,    -1,
      -1,    33,    34,    35,    36,    37,    38,    39,    40,    41,
      33,    34,    35,    36,    37,    38,    39,    40,    41,    57,
      -1,    53,    54,    -1,    -1,    57,     8,    -1,    60,    61,
      62,    63,    -1,    15,    16,    17,    18,    19,    20,     1,
      -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,
      12,    33,    34,    35,    36,    37,    38,    39,    40,    41,
      -1,    -1,    -1,    25,    26,    27,    28,    29,    30,    31,
      32,    53,    54,    -1,    -1,    -1,     1,    -1,    60,    61,
      62,    63,     7,    -1,     9,    10,    11,    12,    -1,    -1,
      52,    -1,    -1,    55,    56,    -1,    -1,    -1,    -1,    -1,
      25,    26,    27,    28,    29,    30,    31,    32,     1,    -1,
      -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,    12,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,
      55,    56,    25,    26,    27,    28,    29,    30,    31,    32,
       1,    -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,
      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    55,    56,    25,    26,    27,    28,    29,    30,
      31,    32,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    52,    -1,    -1,    55,    56,    25,    26,    27,    28,
      29,    30,    31,    32,     1,    -1,    -1,    -1,    -1,    -1,
       7,    -1,     9,    10,    11,    12,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    52,    -1,    -1,    55,    56,    25,    26,
      27,    28,    29,    30,    31,    32,     1,    -1,    -1,    -1,
      -1,    -1,     7,    -1,     9,    10,    11,    12,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,    55,    56,
      25,    26,    27,    28,    29,    30,    31,    32,     1,    -1,
      -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,    12,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,
      55,    56,    25,    26,    27,    28,    29,    30,    31,    32,
       1,    -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,
      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    55,    56,    25,    26,    27,    28,    29,    30,
      31,    32,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    52,    -1,    -1,    55,    56,    25,    26,    27,    28,
      29,    30,    31,    32,     1,    -1,    -1,    -1,    -1,    -1,
       7,    -1,     9,    10,    11,    12,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    52,    -1,    -1,    55,    56,    25,    26,
      27,    28,    29,    30,    31,    32,     1,    -1,    -1,    -1,
      -1,    -1,     7,    -1,     9,    10,    11,    12,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,    55,    56,
      25,    26,    27,    28,    29,    30,    31,    32,     1,    -1,
      -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,    12,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,
      55,    56,    25,    26,    27,    28,    29,    30,    31,    32,
       1,    -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,
      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    55,    56,    25,    26,    27,    28,    29,    30,
      31,    32,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    52,    -1,    -1,    55,    56,    25,    26,    27,    28,
      29,    30,    31,    32,     1,    -1,    -1,    -1,    -1,    -1,
       7,    -1,     9,    10,    11,    12,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    52,    -1,    -1,    55,    56,    25,    26,
      27,    28,    29,    30,    31,    32,     1,    -1,    -1,    -1,
      -1,    -1,     7,    -1,     9,    10,    11,    12,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,    55,    56,
      25,    26,    27,    28,    29,    30,    31,    32,     1,    -1,
      -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,    12,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,
      55,    56,    25,    26,    27,    28,    29,    30,    31,    32,
       1,    -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,
      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    55,    56,    25,    26,    27,    28,    29,    30,
      31,    32,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    52,    -1,    -1,    55,    56,    25,    26,    27,    28,
      29,    30,    31,    32,     1,    -1,    -1,    -1,    -1,    -1,
       7,    -1,     9,    10,    11,    12,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    52,    -1,    -1,    55,    56,    25,    26,
      27,    28,    29,    30,    31,    32,     1,    -1,    -1,    -1,
      -1,    -1,     7,    -1,     9,    10,    11,    12,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,    55,    56,
      25,    26,    27,    28,    29,    30,    31,    32,     1,    -1,
      -1,    -1,    -1,    -1,     7,    -1,     9,    10,    11,    12,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,    -1,    -1,
      55,    56,    25,    26,    27,    28,    29,    30,    31,    32,
       1,    -1,    -1,    -1,    -1,    -1,     7,    -1,     9,    10,
      11,    12,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    52,
      -1,    -1,    55,    56,    25,    26,    27,    28,    29,    30,
      31,    32,     1,    -1,    -1,    -1,    -1,    -1,     7,    -1,
       9,    10,    11,    12,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    52,    -1,    -1,    55,    56,    25,    26,    27,    28,
      29,    30,    31,    32,     1,    -1,    -1,    -1,    -1,    -1,
       7,     1,     9,    10,    11,    12,     1,     7,    -1,     9,
      -1,    -1,     7,    52,     9,    -1,    55,    56,    25,    26,
      27,    28,    29,    30,    31,    32,    -1,    -1,    -1,    29,
       1,    -1,    -1,    -1,    29,     1,     7,    -1,     9,    -1,
      -1,     7,    -1,     9,    -1,    52,    -1,    -1,    55,    56,
      -1,    -1,    52,    -1,    -1,    55,    56,    52,    29,     1,
      55,    56,    -1,    29,     1,     7,    -1,     9,    -1,     1,
       7,    -1,     9,    -1,    -1,     7,    -1,     9,    -1,    -1,
      -1,    52,    17,    18,    55,    56,    52,    29,    -1,    55,
      56,    -1,    29,    -1,    -1,    -1,    -1,    29,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    -1,    -1,    -1,
      52,    -1,    -1,    55,    56,    52,    -1,    -1,    55,    56,
      52,    -1,    -1,    55,    56,     7,    -1,     9,    10,    11,
      12,    -1,    -1,    -1,    -1,    -1,    15,    16,    17,    18,
      19,    20,    -1,    25,    26,    27,    28,    29,    30,    31,
      32,    -1,    -1,    -1,    33,    34,    35,    36,    37,    38,
      39,    40,    41,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      52,    -1,    -1,    55,    56,    54,    -1,    -1,    -1,    -1,
      -1,    60,    61,    62,    63,    15,    16,    17,    18,    19,
      20,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      52,    -1,    -1,    33,    34,    35,    36,    37,    38,    39,
      40,    41,    64,    65,    66,    67,    68,    69,    70,    71,
      72,    73,    74,    75,    76,    77,    78,    79,    -1,    -1,
      60,    61,    62,    63,    15,    16,    17,    18,    19,    20,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    33,    34,    35,    36,    37,    38,    39,    40,
      41
  };

  const signed char
  parser::yystos_[] =
  {
       0,     3,     4,     5,     6,    81,     1,     7,     9,    10,
      11,    12,    25,    26,    27,    28,    29,    30,    31,    32,
      52,    55,    56,    57,    82,    83,    94,    95,    97,    98,
     100,    64,    65,    66,    67,    68,    69,    70,    71,    72,
      73,    74,    75,    76,    77,    78,    79,    82,    83,    94,
     101,     7,     9,    12,    29,    33,    34,    36,    38,    51,
      60,    61,    62,    63,    82,    83,    89,    90,    93,    95,
      96,    97,     7,     9,    29,    82,    83,    95,    99,     0,
      57,     1,   100,     1,    96,     1,   100,     1,   100,     1,
     100,     1,   100,     1,   100,     1,    43,    44,    86,     1,
      44,    86,     1,    44,    86,    58,    59,    47,    48,    49,
      50,    98,    15,    16,    17,    18,    19,    20,    21,    22,
      23,    24,    33,    57,    83,   101,   101,   101,   101,   101,
     101,   101,   101,   101,   101,   101,   101,   101,   101,    57,
      83,     1,    96,    96,    96,     1,    44,    46,    84,    85,
      86,    87,     7,     1,    96,     1,    86,    87,     1,    96,
      15,    16,    17,    18,    19,    20,    35,    37,    39,    40,
      41,    53,    54,    57,    60,    83,    88,    90,    91,    92,
      93,     1,    99,     1,    99,    15,    16,    17,    18,    19,
      20,    33,    57,    83,     8,    57,     1,     8,    57,    13,
      57,     1,    13,    14,    57,    42,    43,   100,    42,    43,
      57,    42,    43,    42,    43,    46,    84,    57,    42,    43,
      42,    43,    46,    84,    57,     1,   100,     1,   100,     1,
     100,     1,   100,     1,   100,     1,   100,     1,   100,     1,
     100,     1,   100,     1,   100,     1,   100,     1,   100,     1,
     100,     1,   100,     1,   100,   101,   101,   101,   101,   101,
     101,   101,   101,   101,   101,     8,    57,     8,    57,    42,
      42,    46,    84,    44,    45,    42,    57,    96,    42,    57,
       1,    96,     1,    96,     1,    96,     1,    96,     1,    96,
       1,    96,     1,    86,    87,     1,    86,    87,     1,    42,
      44,    46,    84,    86,     1,    96,     1,    96,     1,    96,
       1,    96,     8,    57,     1,     8,    57,     1,    99,     1,
      99,     1,    99,     1,    99,     1,    99,     1,    99,     1,
      99,     8,    57,    13,    57,   100,   100,     1,   100,   100,
     100,   100,   100,   100,    44,    42,    43,   100,   100,   100,
     100,    44,    42,    43,    44,    42,    42,     8,    42,    57,
      42,    57,    42,    42,    46,    84,    44,    42,    57,     8,
      57,    42,    43,   100,   100,    42,    43,   100,   100,    42,
      44,    42,    42,     1,   100,     1,   100,     1,   100,     1,
     100,    42
  };

  const signed char
  parser::yyr1_[] =
  {
       0,    80,    81,    81,    81,    81,    81,    81,    81,    81,
      81,    81,    81,    81,    81,    81,    81,    81,    82,    83,
      84,    84,    85,    85,    86,    86,    87,    87,    87,    87,
      87,    88,    88,    88,    88,    88,    88,    88,    88,    89,
      89,    90,    90,    90,    90,    90,    91,    91,    91,    91,
      91,    92,    92,    92,    93,    93,    93,    93,    93,    94,
      95,    95,    95,    95,    95,    96,    96,    96,    96,    96,
      96,    96,    96,    96,    96,    96,    96,    96,    96,    96,
      96,    96,    96,    96,    96,    96,    96,    96,    96,    96,
      96,    96,    96,    96,    96,    96,    96,    96,    96,    96,
      96,    96,    96,    97,    97,    97,    97,    97,    97,    97,
      98,    98,    98,    98,    98,    98,    98,    99,    99,    99,
      99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
      99,    99,    99,    99,    99,    99,    99,    99,    99,    99,
      99,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   101,   101,   101,   101,
     101,   101,   101,   101,   101,   101,   101,   101,   101,   101,
     101,   101,   101
  };

  const signed char
  parser::yyr2_[] =
  {
       0,     2,     3,     2,     3,     2,     3,     2,     3,     2,
       3,     2,     3,     2,     3,     2,     3,     2,     1,     2,
       1,     2,     0,     1,     0,     1,     4,     3,     3,     2,
       2,     5,     4,     4,     3,     2,     3,     3,     3,     1,
       1,     1,     1,     2,     3,     3,     1,     1,     2,     3,
       3,     2,     3,     3,     2,     3,     3,     1,     1,     1,
       1,     2,     2,     1,     1,     1,     2,     1,     1,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     2,     2,     3,     3,     2,     2,     3,
       3,     1,     2,     2,     2,     2,     3,     3,     3,     3,
       3,     3,     4,     3,     4,     3,     3,     4,     3,     1,
       1,     3,     4,     3,     3,     4,     3,     1,     1,     3,
       4,     3,     3,     4,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     2,
       2,     1,     1,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     3,     3,     3,     3,     3,
       3,     3,     3,     3,     3,     2,     2,     4,     4,     6,
       6,     5,     5,     6,     6,     3,     4,     4,     2,     2,
       6,     6,     5,     5,     4,     4,     6,     6,     3,     4,
       4,     2,     2,     2,     2,     4,     4,     4,     3,     4,
       4,     3,     2,     2,     1,     3,     2,     3,     3,     3,
       3,     3,     3,     3,     3,     1,     1,     2,     3,     3,
       3,     3,     3,     2,     2,     2,     3,     3,     3,     3,
       3,     1,     1
  };


#if TLYYDEBUG || 1
  // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  // First, the terminals, then, starting at \a YYNTOKENS, nonterminals.
  const char*
  const parser::yytname_[] =
  {
  "\"end of file\"", "error", "\"invalid token\"", "\"LTL start marker\"",
  "\"LBT start marker\"", "\"SERE start marker\"",
  "\"BOOLEAN start marker\"", "\"opening parenthesis\"",
  "\"closing parenthesis\"", "\"(...) block\"", "\"{...} block\"",
  "\"{...}! block\"", "\"opening brace\"", "\"closing brace\"",
  "\"closing brace-bang\"", "\"or operator\"", "\"xor operator\"",
  "\"and operator\"", "\"short and operator\"", "\"implication operator\"",
  "\"equivalent operator\"", "\"until operator\"", "\"release operator\"",
  "\"weak until operator\"", "\"strong release operator\"",
  "\"sometimes operator\"", "\"always operator\"", "\"next operator\"",
  "\"strong next operator\"", "\"not operator\"", "\"X[.] operator\"",
  "\"F[.] operator\"", "\"G[.] operator\"", "\"star operator\"",
  "\"bracket star operator\"", "\"bracket fusion-star operator\"",
  "\"plus operator\"", "\"fusion-plus operator\"",
  "\"opening bracket for star operator\"",
  "\"opening bracket for fusion-star operator\"",
  "\"opening bracket for equal operator\"",
  "\"opening bracket for goto operator\"", "\"closing bracket\"",
  "\"closing !]\"", "\"number for square bracket operator\"",
  "\"unbounded mark\"", "\"separator for square bracket operator\"",
  "\"universal concat operator\"", "\"existential concat operator\"",
  "\"universal non-overlapping concat operator\"",
  "\"existential non-overlapping concat operator\"", "\"first_match\"",
  "\"atomic proposition\"", "\"concat operator\"", "\"fusion operator\"",
  "\"constant true\"", "\"constant false\"", "\"end of formula\"",
  "\"negative suffix\"", "\"positive suffix\"", "\"SVA delay operator\"",
  "\"opening bracket for SVA delay operator\"", "\"##[+] operator\"",
  "\"##[*] operator\"", "'!'", "'&'", "'|'", "'^'", "'i'", "'e'", "'X'",
  "'F'", "'G'", "'U'", "'V'", "'R'", "'W'", "'M'", "'t'", "'f'", "$accept",
  "result", "emptyinput", "enderror", "OP_SQBKT_SEP_unbounded",
  "OP_SQBKT_SEP_opt", "error_opt", "sqbracketargs", "gotoargs",
  "kleen_star", "starargs", "fstarargs", "equalargs", "delayargs",
  "atomprop", "booleanatom", "sere", "bracedsere", "parenthesedsubformula",
  "boolformula", "subformula", "lbtformula", YY_NULLPTR
  };
#endif


#if TLYYDEBUG
  const short
  parser::yyrline_[] =
  {
       0,   293,   293,   298,   303,   308,   310,   315,   320,   325,
     327,   332,   337,   342,   344,   349,   354,   359,   362,   368,
     374,   374,   375,   376,   377,   378,   381,   383,   385,   387,
     389,   393,   395,   397,   399,   401,   403,   405,   408,   413,
     413,   415,   417,   419,   421,   424,   428,   430,   432,   434,
     438,   443,   445,   448,   453,   455,   458,   462,   464,   467,
     475,   476,   477,   481,   483,   486,   487,   499,   500,   509,
     511,   517,   521,   527,   529,   532,   534,   537,   539,   541,
     543,   545,   547,   549,   551,   553,   556,   558,   568,   570,
     580,   582,   591,   600,   609,   627,   645,   659,   661,   674,
     676,   690,   692,   695,   697,   701,   706,   711,   716,   722,
     732,   740,   742,   746,   751,   755,   760,   768,   769,   778,
     780,   784,   789,   794,   799,   805,   807,   809,   811,   813,
     815,   817,   819,   821,   823,   825,   827,   829,   831,   833,
     835,   838,   839,   840,   842,   844,   846,   848,   850,   852,
     854,   856,   858,   860,   862,   864,   866,   868,   870,   872,
     874,   876,   878,   880,   882,   884,   886,   888,   893,   899,
     902,   906,   910,   914,   917,   920,   923,   927,   931,   933,
     935,   938,   942,   946,   950,   955,   962,   965,   968,   971,
     975,   979,   981,   983,   985,   987,   989,   991,   994,   996,
    1000,  1003,  1006,  1008,  1010,  1012,  1014,  1016,  1019,  1021,
    1025,  1030,  1034,  1039,  1043,  1046,  1057,  1058,  1060,  1062,
    1064,  1066,  1068,  1070,  1072,  1074,  1076,  1078,  1080,  1082,
    1084,  1086,  1088
  };

  void
  parser::yy_stack_print_ () const
  {
    *yycdebug_ << "Stack now";
    for (stack_type::const_iterator
           i = yystack_.begin (),
           i_end = yystack_.end ();
         i != i_end; ++i)
      *yycdebug_ << ' ' << int (i->state);
    *yycdebug_ << '\n';
  }

  void
  parser::yy_reduce_print_ (int yyrule) const
  {
    int yylno = yyrline_[yyrule];
    int yynrhs = yyr2_[yyrule];
    // Print the symbols being reduced, and their result.
    *yycdebug_ << "Reducing stack by rule " << yyrule - 1
               << " (line " << yylno << "):\n";
    // The symbols being reduced.
    for (int yyi = 0; yyi < yynrhs; yyi++)
      YY_SYMBOL_PRINT ("   $" << yyi + 1 << " =",
                       yystack_[(yynrhs) - (yyi + 1)]);
  }
#endif // TLYYDEBUG

  parser::symbol_kind_type
  parser::yytranslate_ (int t) YY_NOEXCEPT
  {
    // YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to
    // TOKEN-NUM as returned by yylex.
    static
    const signed char
    translate_table[] =
    {
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    64,     2,     2,     2,     2,    65,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      71,    72,     2,     2,     2,     2,     2,    77,     2,     2,
       2,     2,    75,     2,     2,    73,    74,    76,    70,     2,
       2,     2,     2,     2,    67,     2,     2,     2,     2,     2,
       2,    69,    79,     2,     2,    68,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,    78,     2,     2,     2,
       2,     2,     2,     2,    66,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
       5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
      15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
      25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
      35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
      45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
      55,    56,    57,    58,    59,    60,    61,    62,    63
    };
    // Last valid token kind.
    const int code_max = 318;

    if (t <= 0)
      return symbol_kind::S_YYEOF;
    else if (t <= code_max)
      return static_cast <symbol_kind_type> (translate_table[t]);
    else
      return symbol_kind::S_YYUNDEF;
  }

} // tlyy
#line 3803 "parsetl.cc"

#line 1092 "parsetl.yy"


void
tlyy::parser::error(const location_type& location, const std::string& message)
{
  error_list.emplace_back(location, message);
}

namespace spot
{
  parsed_formula
  parse_infix_psl(const std::string& ltl_string,
		  environment& env,
		  bool debug, bool lenient)
  {
    parsed_formula result(ltl_string);
    flex_set_buffer(ltl_string,
		    tlyy::parser::token::START_LTL,
		    lenient);
    tlyy::parser parser(result.errors, env, result.f);
    parser.set_debug_level(debug);
    parser.parse();
    flex_unset_buffer();
    return result;
  }

  parsed_formula
  parse_infix_boolean(const std::string& ltl_string,
		      environment& env,
		      bool debug, bool lenient)
  {
    parsed_formula result(ltl_string);
    flex_set_buffer(ltl_string,
		    tlyy::parser::token::START_BOOL,
		    lenient);
    tlyy::parser parser(result.errors, env, result.f);
    parser.set_debug_level(debug);
    parser.parse();
    flex_unset_buffer();
    return result;
  }

  parsed_formula
  parse_prefix_ltl(const std::string& ltl_string,
		   environment& env,
		   bool debug)
  {
    parsed_formula result(ltl_string);
    flex_set_buffer(ltl_string,
		    tlyy::parser::token::START_LBT,
		    false);
    tlyy::parser parser(result.errors, env, result.f);
    parser.set_debug_level(debug);
    parser.parse();
    flex_unset_buffer();
    return result;
  }

  parsed_formula
  parse_infix_sere(const std::string& sere_string,
		   environment& env,
		   bool debug,
		   bool lenient)
  {
    parsed_formula result(sere_string);
    flex_set_buffer(sere_string,
		    tlyy::parser::token::START_SERE,
		    lenient);
    tlyy::parser parser(result.errors, env, result.f);
    parser.set_debug_level(debug);
    parser.parse();
    flex_unset_buffer();
    return result;
  }

  formula
  parse_formula(const std::string& ltl_string, environment& env)
  {
    parsed_formula pf = parse_infix_psl(ltl_string, env);
    std::ostringstream s;
    if (pf.format_errors(s))
      {
	parsed_formula pg = parse_prefix_ltl(ltl_string, env);
	if (pg.errors.empty())
	  return pg.f;
	else
	  throw parse_error(s.str());
      }
    return pf.f;
  }
}

// Local Variables:
// mode: c++
// End:
