spot  2.10.0.dev
parsetl.hh
Go to the documentation of this file.
1 // A Bison parser, made by GNU Bison 3.8.2.
2 
3 // Skeleton interface for Bison LALR(1) parsers in C++
4 
5 // Copyright (C) 2002-2015, 2018-2021 Free Software Foundation, Inc.
6 
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <https://www.gnu.org/licenses/>.
19 
20 // As a special exception, you may create a larger work that contains
21 // part or all of the Bison parser skeleton and distribute that work
22 // under terms of your choice, so long as that work isn't itself a
23 // parser generator using the skeleton or a modified version thereof
24 // as a parser skeleton. Alternatively, if you modify or redistribute
25 // the parser skeleton itself, you may (at your option) remove this
26 // special exception, which will cause the skeleton and the resulting
27 // Bison output files to be licensed under the GNU General Public
28 // License without this special exception.
29 
30 // This special exception was added by the Free Software Foundation in
31 // version 2.2 of Bison.
32 
33 
39 // C++ LALR(1) parser skeleton written by Akim Demaille.
40 
41 // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
42 // especially those whose name start with YY_ or yy_. They are
43 // private implementation details that can be changed or removed.
44 
45 #ifndef YY_TLYY_PARSETL_HH_INCLUDED
46 # define YY_TLYY_PARSETL_HH_INCLUDED
47 // "%code requires" blocks.
48 #line 36 "parsetl.yy"
49 
50 #include "config.h"
51 #include <string>
52 #include <sstream>
53 #include <spot/tl/parse.hh>
54 #include <spot/tl/formula.hh>
55 #include <spot/tl/print.hh>
56 
57  struct minmax_t { unsigned min, max; };
58 
59 #line 60 "parsetl.hh"
60 
61 
62 # include <cstdlib> // std::abort
63 # include <iostream>
64 # include <stdexcept>
65 # include <string>
66 # include <vector>
67 
68 #if defined __cplusplus
69 # define YY_CPLUSPLUS __cplusplus
70 #else
71 # define YY_CPLUSPLUS 199711L
72 #endif
73 
74 // Support move semantics when possible.
75 #if 201103L <= YY_CPLUSPLUS
76 # define YY_MOVE std::move
77 # define YY_MOVE_OR_COPY move
78 # define YY_MOVE_REF(Type) Type&&
79 # define YY_RVREF(Type) Type&&
80 # define YY_COPY(Type) Type
81 #else
82 # define YY_MOVE
83 # define YY_MOVE_OR_COPY copy
84 # define YY_MOVE_REF(Type) Type&
85 # define YY_RVREF(Type) const Type&
86 # define YY_COPY(Type) const Type&
87 #endif
88 
89 // Support noexcept when possible.
90 #if 201103L <= YY_CPLUSPLUS
91 # define YY_NOEXCEPT noexcept
92 # define YY_NOTHROW
93 #else
94 # define YY_NOEXCEPT
95 # define YY_NOTHROW throw ()
96 #endif
97 
98 // Support constexpr when possible.
99 #if 201703 <= YY_CPLUSPLUS
100 # define YY_CONSTEXPR constexpr
101 #else
102 # define YY_CONSTEXPR
103 #endif
104 
105 
106 
107 #ifndef YY_ATTRIBUTE_PURE
108 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
109 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
110 # else
111 # define YY_ATTRIBUTE_PURE
112 # endif
113 #endif
114 
115 #ifndef YY_ATTRIBUTE_UNUSED
116 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
117 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
118 # else
119 # define YY_ATTRIBUTE_UNUSED
120 # endif
121 #endif
122 
123 /* Suppress unused-variable warnings by "using" E. */
124 #if ! defined lint || defined __GNUC__
125 # define YY_USE(E) ((void) (E))
126 #else
127 # define YY_USE(E) /* empty */
128 #endif
129 
130 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
131 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
132 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
133 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
134  _Pragma ("GCC diagnostic push") \
135  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
136 # else
137 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
138  _Pragma ("GCC diagnostic push") \
139  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
140  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
141 # endif
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
143  _Pragma ("GCC diagnostic pop")
144 #else
145 # define YY_INITIAL_VALUE(Value) Value
146 #endif
147 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
148 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
149 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
150 #endif
151 #ifndef YY_INITIAL_VALUE
152 # define YY_INITIAL_VALUE(Value) /* Nothing. */
153 #endif
154 
155 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
156 # define YY_IGNORE_USELESS_CAST_BEGIN \
157  _Pragma ("GCC diagnostic push") \
158  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
159 # define YY_IGNORE_USELESS_CAST_END \
160  _Pragma ("GCC diagnostic pop")
161 #endif
162 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
163 # define YY_IGNORE_USELESS_CAST_BEGIN
164 # define YY_IGNORE_USELESS_CAST_END
165 #endif
166 
167 # ifndef YY_CAST
168 # ifdef __cplusplus
169 # define YY_CAST(Type, Val) static_cast<Type> (Val)
170 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
171 # else
172 # define YY_CAST(Type, Val) ((Type) (Val))
173 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
174 # endif
175 # endif
176 # ifndef YY_NULLPTR
177 # if defined __cplusplus
178 # if 201103L <= __cplusplus
179 # define YY_NULLPTR nullptr
180 # else
181 # define YY_NULLPTR 0
182 # endif
183 # else
184 # define YY_NULLPTR ((void*)0)
185 # endif
186 # endif
187 
188 /* Debug traces. */
189 #ifndef TLYYDEBUG
190 # if defined YYDEBUG
191 #if YYDEBUG
192 # define TLYYDEBUG 1
193 # else
194 # define TLYYDEBUG 0
195 # endif
196 # else /* ! defined YYDEBUG */
197 # define TLYYDEBUG 1
198 # endif /* ! defined YYDEBUG */
199 #endif /* ! defined TLYYDEBUG */
200 
201 namespace tlyy {
202 #line 203 "parsetl.hh"
203 
204 
205 
206 
208  class parser
209  {
210  public:
211 #ifdef TLYYSTYPE
212 # ifdef __GNUC__
213 # pragma GCC message "bison: do not #define TLYYSTYPE in C++, use %define api.value.type"
214 # endif
215  typedef TLYYSTYPE value_type;
216 #else
219  {
220 #line 52 "parsetl.yy"
221 
222  std::string* str;
223  const spot::fnode* ltl;
224  unsigned num;
225  minmax_t minmax;
226 
227 #line 228 "parsetl.hh"
228 
229  };
230 #endif
233 
235  typedef spot::location location_type;
236 
238  struct syntax_error : std::runtime_error
239  {
240  syntax_error (const location_type& l, const std::string& m)
241  : std::runtime_error (m)
242  , location (l)
243  {}
244 
245  syntax_error (const syntax_error& s)
246  : std::runtime_error (s.what ())
247  , location (s.location)
248  {}
249 
250  ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
251 
252  location_type location;
253  };
254 
256  struct token
257  {
258  enum token_kind_type
259  {
260  TLYYEMPTY = -2,
261  TLYYEOF = 0, // "end of file"
262  TLYYerror = 256, // error
263  TLYYUNDEF = 257, // "invalid token"
264  START_LTL = 258, // "LTL start marker"
265  START_LBT = 259, // "LBT start marker"
266  START_SERE = 260, // "SERE start marker"
267  START_BOOL = 261, // "BOOLEAN start marker"
268  PAR_OPEN = 262, // "opening parenthesis"
269  PAR_CLOSE = 263, // "closing parenthesis"
270  PAR_BLOCK = 264, // "(...) block"
271  BRA_BLOCK = 265, // "{...} block"
272  BRA_BANG_BLOCK = 266, // "{...}! block"
273  BRACE_OPEN = 267, // "opening brace"
274  BRACE_CLOSE = 268, // "closing brace"
275  BRACE_BANG_CLOSE = 269, // "closing brace-bang"
276  OP_OR = 270, // "or operator"
277  OP_XOR = 271, // "xor operator"
278  OP_AND = 272, // "and operator"
279  OP_SHORT_AND = 273, // "short and operator"
280  OP_IMPLIES = 274, // "implication operator"
281  OP_EQUIV = 275, // "equivalent operator"
282  OP_U = 276, // "until operator"
283  OP_R = 277, // "release operator"
284  OP_W = 278, // "weak until operator"
285  OP_M = 279, // "strong release operator"
286  OP_F = 280, // "sometimes operator"
287  OP_G = 281, // "always operator"
288  OP_X = 282, // "next operator"
289  OP_STRONG_X = 283, // "strong next operator"
290  OP_NOT = 284, // "not operator"
291  OP_XREP = 285, // "X[.] operator"
292  OP_FREP = 286, // "F[.] operator"
293  OP_GREP = 287, // "G[.] operator"
294  OP_STAR = 288, // "star operator"
295  OP_BSTAR = 289, // "bracket star operator"
296  OP_BFSTAR = 290, // "bracket fusion-star operator"
297  OP_PLUS = 291, // "plus operator"
298  OP_FPLUS = 292, // "fusion-plus operator"
299  OP_STAR_OPEN = 293, // "opening bracket for star operator"
300  OP_FSTAR_OPEN = 294, // "opening bracket for fusion-star operator"
301  OP_EQUAL_OPEN = 295, // "opening bracket for equal operator"
302  OP_GOTO_OPEN = 296, // "opening bracket for goto operator"
303  OP_SQBKT_CLOSE = 297, // "closing bracket"
304  OP_SQBKT_STRONG_CLOSE = 298, // "closing !]"
305  OP_SQBKT_NUM = 299, // "number for square bracket operator"
306  OP_UNBOUNDED = 300, // "unbounded mark"
307  OP_SQBKT_SEP = 301, // "separator for square bracket operator"
308  OP_UCONCAT = 302, // "universal concat operator"
309  OP_ECONCAT = 303, // "existential concat operator"
310  OP_UCONCAT_NONO = 304, // "universal non-overlapping concat operator"
311  OP_ECONCAT_NONO = 305, // "existential non-overlapping concat operator"
312  OP_FIRST_MATCH = 306, // "first_match"
313  ATOMIC_PROP = 307, // "atomic proposition"
314  OP_CONCAT = 308, // "concat operator"
315  OP_FUSION = 309, // "fusion operator"
316  CONST_TRUE = 310, // "constant true"
317  CONST_FALSE = 311, // "constant false"
318  END_OF_INPUT = 312, // "end of formula"
319  OP_POST_NEG = 313, // "negative suffix"
320  OP_POST_POS = 314, // "positive suffix"
321  OP_DELAY_N = 315, // "SVA delay operator"
322  OP_DELAY_OPEN = 316, // "opening bracket for SVA delay operator"
323  OP_DELAY_PLUS = 317, // "##[+] operator"
324  OP_DELAY_STAR = 318 // "##[*] operator"
325  };
327  typedef token_kind_type yytokentype;
328  };
329 
331  typedef token::token_kind_type token_kind_type;
332 
334  typedef token_kind_type token_type;
335 
337  struct symbol_kind
338  {
340  {
341  YYNTOKENS = 80,
342  S_YYEMPTY = -2,
343  S_YYEOF = 0, // "end of file"
344  S_YYerror = 1, // error
345  S_YYUNDEF = 2, // "invalid token"
346  S_START_LTL = 3, // "LTL start marker"
347  S_START_LBT = 4, // "LBT start marker"
348  S_START_SERE = 5, // "SERE start marker"
349  S_START_BOOL = 6, // "BOOLEAN start marker"
350  S_PAR_OPEN = 7, // "opening parenthesis"
351  S_PAR_CLOSE = 8, // "closing parenthesis"
352  S_PAR_BLOCK = 9, // "(...) block"
353  S_BRA_BLOCK = 10, // "{...} block"
354  S_BRA_BANG_BLOCK = 11, // "{...}! block"
355  S_BRACE_OPEN = 12, // "opening brace"
356  S_BRACE_CLOSE = 13, // "closing brace"
357  S_BRACE_BANG_CLOSE = 14, // "closing brace-bang"
358  S_OP_OR = 15, // "or operator"
359  S_OP_XOR = 16, // "xor operator"
360  S_OP_AND = 17, // "and operator"
361  S_OP_SHORT_AND = 18, // "short and operator"
362  S_OP_IMPLIES = 19, // "implication operator"
363  S_OP_EQUIV = 20, // "equivalent operator"
364  S_OP_U = 21, // "until operator"
365  S_OP_R = 22, // "release operator"
366  S_OP_W = 23, // "weak until operator"
367  S_OP_M = 24, // "strong release operator"
368  S_OP_F = 25, // "sometimes operator"
369  S_OP_G = 26, // "always operator"
370  S_OP_X = 27, // "next operator"
371  S_OP_STRONG_X = 28, // "strong next operator"
372  S_OP_NOT = 29, // "not operator"
373  S_OP_XREP = 30, // "X[.] operator"
374  S_OP_FREP = 31, // "F[.] operator"
375  S_OP_GREP = 32, // "G[.] operator"
376  S_OP_STAR = 33, // "star operator"
377  S_OP_BSTAR = 34, // "bracket star operator"
378  S_OP_BFSTAR = 35, // "bracket fusion-star operator"
379  S_OP_PLUS = 36, // "plus operator"
380  S_OP_FPLUS = 37, // "fusion-plus operator"
381  S_OP_STAR_OPEN = 38, // "opening bracket for star operator"
382  S_OP_FSTAR_OPEN = 39, // "opening bracket for fusion-star operator"
383  S_OP_EQUAL_OPEN = 40, // "opening bracket for equal operator"
384  S_OP_GOTO_OPEN = 41, // "opening bracket for goto operator"
385  S_OP_SQBKT_CLOSE = 42, // "closing bracket"
386  S_OP_SQBKT_STRONG_CLOSE = 43, // "closing !]"
387  S_OP_SQBKT_NUM = 44, // "number for square bracket operator"
388  S_OP_UNBOUNDED = 45, // "unbounded mark"
389  S_OP_SQBKT_SEP = 46, // "separator for square bracket operator"
390  S_OP_UCONCAT = 47, // "universal concat operator"
391  S_OP_ECONCAT = 48, // "existential concat operator"
392  S_OP_UCONCAT_NONO = 49, // "universal non-overlapping concat operator"
393  S_OP_ECONCAT_NONO = 50, // "existential non-overlapping concat operator"
394  S_OP_FIRST_MATCH = 51, // "first_match"
395  S_ATOMIC_PROP = 52, // "atomic proposition"
396  S_OP_CONCAT = 53, // "concat operator"
397  S_OP_FUSION = 54, // "fusion operator"
398  S_CONST_TRUE = 55, // "constant true"
399  S_CONST_FALSE = 56, // "constant false"
400  S_END_OF_INPUT = 57, // "end of formula"
401  S_OP_POST_NEG = 58, // "negative suffix"
402  S_OP_POST_POS = 59, // "positive suffix"
403  S_OP_DELAY_N = 60, // "SVA delay operator"
404  S_OP_DELAY_OPEN = 61, // "opening bracket for SVA delay operator"
405  S_OP_DELAY_PLUS = 62, // "##[+] operator"
406  S_OP_DELAY_STAR = 63, // "##[*] operator"
407  S_64_ = 64, // '!'
408  S_65_ = 65, // '&'
409  S_66_ = 66, // '|'
410  S_67_ = 67, // '^'
411  S_68_i_ = 68, // 'i'
412  S_69_e_ = 69, // 'e'
413  S_70_X_ = 70, // 'X'
414  S_71_F_ = 71, // 'F'
415  S_72_G_ = 72, // 'G'
416  S_73_U_ = 73, // 'U'
417  S_74_V_ = 74, // 'V'
418  S_75_R_ = 75, // 'R'
419  S_76_W_ = 76, // 'W'
420  S_77_M_ = 77, // 'M'
421  S_78_t_ = 78, // 't'
422  S_79_f_ = 79, // 'f'
423  S_YYACCEPT = 80, // $accept
424  S_result = 81, // result
425  S_emptyinput = 82, // emptyinput
426  S_enderror = 83, // enderror
427  S_OP_SQBKT_SEP_unbounded = 84, // OP_SQBKT_SEP_unbounded
428  S_OP_SQBKT_SEP_opt = 85, // OP_SQBKT_SEP_opt
429  S_error_opt = 86, // error_opt
430  S_sqbracketargs = 87, // sqbracketargs
431  S_gotoargs = 88, // gotoargs
432  S_kleen_star = 89, // kleen_star
433  S_starargs = 90, // starargs
434  S_fstarargs = 91, // fstarargs
435  S_equalargs = 92, // equalargs
436  S_delayargs = 93, // delayargs
437  S_atomprop = 94, // atomprop
438  S_booleanatom = 95, // booleanatom
439  S_sere = 96, // sere
440  S_bracedsere = 97, // bracedsere
441  S_parenthesedsubformula = 98, // parenthesedsubformula
442  S_boolformula = 99, // boolformula
443  S_subformula = 100, // subformula
444  S_lbtformula = 101 // lbtformula
445  };
446  };
447 
450 
453 
460  template <typename Base>
461  struct basic_symbol : Base
462  {
464  typedef Base super_type;
465 
467  basic_symbol () YY_NOEXCEPT
468  : value ()
469  , location ()
470  {}
471 
472 #if 201103L <= YY_CPLUSPLUS
474  basic_symbol (basic_symbol&& that)
475  : Base (std::move (that))
476  , value (std::move (that.value))
477  , location (std::move (that.location))
478  {}
479 #endif
480 
482  basic_symbol (const basic_symbol& that);
484  basic_symbol (typename Base::kind_type t,
485  YY_MOVE_REF (location_type) l);
486 
488  basic_symbol (typename Base::kind_type t,
489  YY_RVREF (value_type) v,
490  YY_RVREF (location_type) l);
491 
494  {
495  clear ();
496  }
497 
498 
499 
501  void clear () YY_NOEXCEPT
502  {
503  Base::clear ();
504  }
505 
507  std::string name () const YY_NOEXCEPT
508  {
509  return parser::symbol_name (this->kind ());
510  }
511 
513  symbol_kind_type type_get () const YY_NOEXCEPT;
514 
516  bool empty () const YY_NOEXCEPT;
517 
519  void move (basic_symbol& s);
520 
523 
526 
527  private:
528 #if YY_CPLUSPLUS < 201103L
530  basic_symbol& operator= (const basic_symbol& that);
531 #endif
532  };
533 
535  struct by_kind
536  {
538  typedef token_kind_type kind_type;
539 
541  by_kind () YY_NOEXCEPT;
542 
543 #if 201103L <= YY_CPLUSPLUS
545  by_kind (by_kind&& that) YY_NOEXCEPT;
546 #endif
547 
549  by_kind (const by_kind& that) YY_NOEXCEPT;
550 
552  by_kind (kind_type t) YY_NOEXCEPT;
553 
554 
555 
557  void clear () YY_NOEXCEPT;
558 
560  void move (by_kind& that);
561 
564  symbol_kind_type kind () const YY_NOEXCEPT;
565 
567  symbol_kind_type type_get () const YY_NOEXCEPT;
568 
572  };
573 
575  typedef by_kind by_type;
576 
579  {};
580 
582  parser (spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg);
583  virtual ~parser ();
584 
585 #if 201103L <= YY_CPLUSPLUS
587  parser (const parser&) = delete;
589  parser& operator= (const parser&) = delete;
590 #endif
591 
594  int operator() ();
595 
598  virtual int parse ();
599 
600 #if TLYYDEBUG
602  std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
604  void set_debug_stream (std::ostream &);
605 
607  typedef int debug_level_type;
609  debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
612 #endif
613 
617  virtual void error (const location_type& loc, const std::string& msg);
618 
620  void error (const syntax_error& err);
621 
624  static std::string symbol_name (symbol_kind_type yysymbol);
625 
626 
627 
628  class context
629  {
630  public:
631  context (const parser& yyparser, const symbol_type& yyla);
632  const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
633  symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
634  const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
635 
639  int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
640 
641  private:
642  const parser& yyparser_;
643  const symbol_type& yyla_;
644  };
645 
646  private:
647 #if YY_CPLUSPLUS < 201103L
649  parser (const parser&);
651  parser& operator= (const parser&);
652 #endif
653 
654 
656  typedef short state_type;
657 
659  int yy_syntax_error_arguments_ (const context& yyctx,
660  symbol_kind_type yyarg[], int yyargn) const;
661 
664  virtual std::string yysyntax_error_ (const context& yyctx) const;
668  static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
669 
672  static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
673 
676  static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
677 
678  static const signed char yypact_ninf_;
679  static const signed char yytable_ninf_;
680 
684  static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
685 
687  static std::string yytnamerr_ (const char *yystr);
688 
690  static const char* const yytname_[];
691 
692 
693  // Tables.
694  // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
695  // STATE-NUM.
696  static const short yypact_[];
697 
698  // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
699  // Performed when YYTABLE does not specify something else to do. Zero
700  // means the default is an error.
701  static const unsigned char yydefact_[];
702 
703  // YYPGOTO[NTERM-NUM].
704  static const short yypgoto_[];
705 
706  // YYDEFGOTO[NTERM-NUM].
707  static const unsigned char yydefgoto_[];
708 
709  // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
710  // positive, shift that token. If negative, reduce the rule whose
711  // number is the opposite. If YYTABLE_NINF, syntax error.
712  static const short yytable_[];
713 
714  static const short yycheck_[];
715 
716  // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
717  // state STATE-NUM.
718  static const signed char yystos_[];
719 
720  // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
721  static const signed char yyr1_[];
722 
723  // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
724  static const signed char yyr2_[];
725 
726 
727 #if TLYYDEBUG
728  // YYRLINE[YYN] -- Source line where rule number YYN was defined.
729  static const short yyrline_[];
731  virtual void yy_reduce_print_ (int r) const;
733  virtual void yy_stack_print_ () const;
734 
736  int yydebug_;
738  std::ostream* yycdebug_;
739 
743  template <typename Base>
744  void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
745 #endif
746 
751  template <typename Base>
752  void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
753 
754  private:
756  struct by_state
757  {
759  by_state () YY_NOEXCEPT;
760 
762  typedef state_type kind_type;
763 
765  by_state (kind_type s) YY_NOEXCEPT;
766 
768  by_state (const by_state& that) YY_NOEXCEPT;
769 
771  void clear () YY_NOEXCEPT;
772 
774  void move (by_state& that);
775 
778  symbol_kind_type kind () const YY_NOEXCEPT;
779 
782  enum { empty_state = 0 };
783 
786  state_type state;
787  };
788 
790  struct stack_symbol_type : basic_symbol<by_state>
791  {
793  typedef basic_symbol<by_state> super_type;
795  stack_symbol_type ();
797  stack_symbol_type (YY_RVREF (stack_symbol_type) that);
799  stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
800 #if YY_CPLUSPLUS < 201103L
803  stack_symbol_type& operator= (stack_symbol_type& that);
804 
807  stack_symbol_type& operator= (const stack_symbol_type& that);
808 #endif
809  };
810 
812  template <typename T, typename S = std::vector<T> >
813  class stack
814  {
815  public:
816  // Hide our reversed order.
817  typedef typename S::iterator iterator;
818  typedef typename S::const_iterator const_iterator;
819  typedef typename S::size_type size_type;
820  typedef typename std::ptrdiff_t index_type;
821 
822  stack (size_type n = 200) YY_NOEXCEPT
823  : seq_ (n)
824  {}
825 
826 #if 201103L <= YY_CPLUSPLUS
828  stack (const stack&) = delete;
830  stack& operator= (const stack&) = delete;
831 #endif
832 
836  const T&
837  operator[] (index_type i) const
838  {
839  return seq_[size_type (size () - 1 - i)];
840  }
841 
845  T&
846  operator[] (index_type i)
847  {
848  return seq_[size_type (size () - 1 - i)];
849  }
850 
854  void
855  push (YY_MOVE_REF (T) t)
856  {
857  seq_.push_back (T ());
858  operator[] (0).move (t);
859  }
860 
862  void
863  pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
864  {
865  for (; 0 < n; --n)
866  seq_.pop_back ();
867  }
868 
870  void
871  clear () YY_NOEXCEPT
872  {
873  seq_.clear ();
874  }
875 
877  index_type
878  size () const YY_NOEXCEPT
879  {
880  return index_type (seq_.size ());
881  }
882 
884  const_iterator
885  begin () const YY_NOEXCEPT
886  {
887  return seq_.begin ();
888  }
889 
891  const_iterator
892  end () const YY_NOEXCEPT
893  {
894  return seq_.end ();
895  }
896 
898  class slice
899  {
900  public:
901  slice (const stack& stack, index_type range) YY_NOEXCEPT
902  : stack_ (stack)
903  , range_ (range)
904  {}
905 
906  const T&
907  operator[] (index_type i) const
908  {
909  return stack_[range_ - i];
910  }
911 
912  private:
913  const stack& stack_;
914  index_type range_;
915  };
916 
917  private:
918 #if YY_CPLUSPLUS < 201103L
920  stack (const stack&);
922  stack& operator= (const stack&);
923 #endif
925  S seq_;
926  };
927 
928 
930  typedef stack<stack_symbol_type> stack_type;
931 
933  stack_type yystack_;
934 
940  void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
941 
948  void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
949 
951  void yypop_ (int n = 1) YY_NOEXCEPT;
952 
954  enum
955  {
956  yylast_ = 2370,
957  yynnts_ = 22,
958  yyfinal_ = 79
959  };
960 
961 
962  // User arguments.
963  spot::parse_error_list &error_list;
964  spot::environment &parse_environment;
965  spot::formula &result;
966 
967  };
968 
969 
970 } // tlyy
971 #line 972 "parsetl.hh"
972 
973 
974 
975 
976 #endif // !YY_TLYY_PARSETL_HH_INCLUDED
An environment that describes atomic propositions.
Definition: environment.hh:33
Actual storage for formula nodes.
Definition: formula.hh:128
Main class for temporal logic formula.
Definition: formula.hh:715
Definition: parsetl.hh:629
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:899
A Bison parser.
Definition: parsetl.hh:209
parser(spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg)
Build a parser object.
token::token_kind_type token_kind_type
Token kind, as returned by yylex.
Definition: parsetl.hh:331
void set_debug_level(debug_level_type l)
Set the current debugging level.
static const symbol_kind_type YYNTOKENS
The number of tokens.
Definition: parsetl.hh:452
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:607
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:449
value_type semantic_type
Backward compatibility (Bison 3.8).
Definition: parsetl.hh:232
virtual void error(const location_type &loc, const std::string &msg)
int operator()()
void set_debug_stream(std::ostream &)
Set the current debugging stream.
debug_level_type debug_level() const
The current debugging level.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:334
std::ostream & debug_stream() const
The current debugging stream.
static std::string symbol_name(symbol_kind_type yysymbol)
virtual int parse()
spot::location location_type
Symbol locations.
Definition: parsetl.hh:235
void error(const syntax_error &err)
Report a syntax error.
LTL/PSL formula interface.
std::list< one_parse_error > parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: parse.hh:42
Definition: parsetl.hh:57
Definition: parsetl.hh:462
basic_symbol(typename Base::kind_type t, location_type &l)
Constructor for valueless symbols.
basic_symbol(const basic_symbol &that)
Copy constructor.
value_type value
The semantic value.
Definition: parsetl.hh:522
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:501
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:507
basic_symbol(typename Base::kind_type t, const value_type &v, const location_type &l)
Constructor for symbols with semantic value.
location_type location
The location.
Definition: parsetl.hh:525
bool empty() const
Whether empty.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:493
Base super_type
Alias to Base.
Definition: parsetl.hh:464
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:467
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:536
symbol_kind_type kind_
Definition: parsetl.hh:571
void move(by_kind &that)
Steal the symbol kind from that.
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
symbol_kind_type kind() const
token_kind_type kind_type
The symbol kind as needed by the constructor.
Definition: parsetl.hh:538
by_kind(const by_kind &that)
Copy constructor.
by_kind()
Default constructor.
by_kind(kind_type t)
Constructor from (external) token numbers.
void clear()
Record that this symbol is empty.
Symbol kinds.
Definition: parsetl.hh:338
symbol_kind_type
Definition: parsetl.hh:340
@ YYNTOKENS
Number of tokens.
Definition: parsetl.hh:341
"External" symbols: returned by the scanner.
Definition: parsetl.hh:579
Syntax errors thrown from user actions.
Definition: parsetl.hh:239
Token kinds.
Definition: parsetl.hh:257
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:327
Symbol semantic values.
Definition: parsetl.hh:219

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.1