spot  2.10.4.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_sqbkt_num = 87, // sqbkt_num
431  S_sqbracketargs = 88, // sqbracketargs
432  S_gotoargs = 89, // gotoargs
433  S_kleen_star = 90, // kleen_star
434  S_starargs = 91, // starargs
435  S_fstarargs = 92, // fstarargs
436  S_equalargs = 93, // equalargs
437  S_delayargs = 94, // delayargs
438  S_atomprop = 95, // atomprop
439  S_booleanatom = 96, // booleanatom
440  S_sere = 97, // sere
441  S_bracedsere = 98, // bracedsere
442  S_parenthesedsubformula = 99, // parenthesedsubformula
443  S_boolformula = 100, // boolformula
444  S_subformula = 101, // subformula
445  S_lbtformula = 102 // lbtformula
446  };
447  };
448 
451 
454 
461  template <typename Base>
462  struct basic_symbol : Base
463  {
465  typedef Base super_type;
466 
468  basic_symbol () YY_NOEXCEPT
469  : value ()
470  , location ()
471  {}
472 
473 #if 201103L <= YY_CPLUSPLUS
475  basic_symbol (basic_symbol&& that)
476  : Base (std::move (that))
477  , value (std::move (that.value))
478  , location (std::move (that.location))
479  {}
480 #endif
481 
483  basic_symbol (const basic_symbol& that);
485  basic_symbol (typename Base::kind_type t,
486  YY_MOVE_REF (location_type) l);
487 
489  basic_symbol (typename Base::kind_type t,
490  YY_RVREF (value_type) v,
491  YY_RVREF (location_type) l);
492 
495  {
496  clear ();
497  }
498 
499 
500 
502  void clear () YY_NOEXCEPT
503  {
504  Base::clear ();
505  }
506 
508  std::string name () const YY_NOEXCEPT
509  {
510  return parser::symbol_name (this->kind ());
511  }
512 
514  symbol_kind_type type_get () const YY_NOEXCEPT;
515 
517  bool empty () const YY_NOEXCEPT;
518 
520  void move (basic_symbol& s);
521 
524 
527 
528  private:
529 #if YY_CPLUSPLUS < 201103L
531  basic_symbol& operator= (const basic_symbol& that);
532 #endif
533  };
534 
536  struct by_kind
537  {
539  typedef token_kind_type kind_type;
540 
542  by_kind () YY_NOEXCEPT;
543 
544 #if 201103L <= YY_CPLUSPLUS
546  by_kind (by_kind&& that) YY_NOEXCEPT;
547 #endif
548 
550  by_kind (const by_kind& that) YY_NOEXCEPT;
551 
553  by_kind (kind_type t) YY_NOEXCEPT;
554 
555 
556 
558  void clear () YY_NOEXCEPT;
559 
561  void move (by_kind& that);
562 
565  symbol_kind_type kind () const YY_NOEXCEPT;
566 
568  symbol_kind_type type_get () const YY_NOEXCEPT;
569 
573  };
574 
576  typedef by_kind by_type;
577 
580  {};
581 
583  parser (spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg);
584  virtual ~parser ();
585 
586 #if 201103L <= YY_CPLUSPLUS
588  parser (const parser&) = delete;
590  parser& operator= (const parser&) = delete;
591 #endif
592 
595  int operator() ();
596 
599  virtual int parse ();
600 
601 #if TLYYDEBUG
603  std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
605  void set_debug_stream (std::ostream &);
606 
608  typedef int debug_level_type;
610  debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
613 #endif
614 
618  virtual void error (const location_type& loc, const std::string& msg);
619 
621  void error (const syntax_error& err);
622 
625  static std::string symbol_name (symbol_kind_type yysymbol);
626 
627 
628 
629  class context
630  {
631  public:
632  context (const parser& yyparser, const symbol_type& yyla);
633  const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
634  symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
635  const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
636 
640  int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
641 
642  private:
643  const parser& yyparser_;
644  const symbol_type& yyla_;
645  };
646 
647  private:
648 #if YY_CPLUSPLUS < 201103L
650  parser (const parser&);
652  parser& operator= (const parser&);
653 #endif
654 
655 
657  typedef short state_type;
658 
660  int yy_syntax_error_arguments_ (const context& yyctx,
661  symbol_kind_type yyarg[], int yyargn) const;
662 
665  virtual std::string yysyntax_error_ (const context& yyctx) const;
669  static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
670 
673  static bool yy_pact_value_is_default_ (int yyvalue) YY_NOEXCEPT;
674 
677  static bool yy_table_value_is_error_ (int yyvalue) YY_NOEXCEPT;
678 
679  static const signed char yypact_ninf_;
680  static const signed char yytable_ninf_;
681 
685  static symbol_kind_type yytranslate_ (int t) YY_NOEXCEPT;
686 
688  static std::string yytnamerr_ (const char *yystr);
689 
691  static const char* const yytname_[];
692 
693 
694  // Tables.
695  // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
696  // STATE-NUM.
697  static const short yypact_[];
698 
699  // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
700  // Performed when YYTABLE does not specify something else to do. Zero
701  // means the default is an error.
702  static const unsigned char yydefact_[];
703 
704  // YYPGOTO[NTERM-NUM].
705  static const short yypgoto_[];
706 
707  // YYDEFGOTO[NTERM-NUM].
708  static const unsigned char yydefgoto_[];
709 
710  // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
711  // positive, shift that token. If negative, reduce the rule whose
712  // number is the opposite. If YYTABLE_NINF, syntax error.
713  static const short yytable_[];
714 
715  static const short yycheck_[];
716 
717  // YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
718  // state STATE-NUM.
719  static const signed char yystos_[];
720 
721  // YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM.
722  static const signed char yyr1_[];
723 
724  // YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM.
725  static const signed char yyr2_[];
726 
727 
728 #if TLYYDEBUG
729  // YYRLINE[YYN] -- Source line where rule number YYN was defined.
730  static const short yyrline_[];
732  virtual void yy_reduce_print_ (int r) const;
734  virtual void yy_stack_print_ () const;
735 
737  int yydebug_;
739  std::ostream* yycdebug_;
740 
744  template <typename Base>
745  void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
746 #endif
747 
752  template <typename Base>
753  void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
754 
755  private:
757  struct by_state
758  {
760  by_state () YY_NOEXCEPT;
761 
763  typedef state_type kind_type;
764 
766  by_state (kind_type s) YY_NOEXCEPT;
767 
769  by_state (const by_state& that) YY_NOEXCEPT;
770 
772  void clear () YY_NOEXCEPT;
773 
775  void move (by_state& that);
776 
779  symbol_kind_type kind () const YY_NOEXCEPT;
780 
783  enum { empty_state = 0 };
784 
787  state_type state;
788  };
789 
791  struct stack_symbol_type : basic_symbol<by_state>
792  {
794  typedef basic_symbol<by_state> super_type;
796  stack_symbol_type ();
798  stack_symbol_type (YY_RVREF (stack_symbol_type) that);
800  stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
801 #if YY_CPLUSPLUS < 201103L
804  stack_symbol_type& operator= (stack_symbol_type& that);
805 
808  stack_symbol_type& operator= (const stack_symbol_type& that);
809 #endif
810  };
811 
813  template <typename T, typename S = std::vector<T> >
814  class stack
815  {
816  public:
817  // Hide our reversed order.
818  typedef typename S::iterator iterator;
819  typedef typename S::const_iterator const_iterator;
820  typedef typename S::size_type size_type;
821  typedef typename std::ptrdiff_t index_type;
822 
823  stack (size_type n = 200) YY_NOEXCEPT
824  : seq_ (n)
825  {}
826 
827 #if 201103L <= YY_CPLUSPLUS
829  stack (const stack&) = delete;
831  stack& operator= (const stack&) = delete;
832 #endif
833 
837  const T&
838  operator[] (index_type i) const
839  {
840  return seq_[size_type (size () - 1 - i)];
841  }
842 
846  T&
847  operator[] (index_type i)
848  {
849  return seq_[size_type (size () - 1 - i)];
850  }
851 
855  void
856  push (YY_MOVE_REF (T) t)
857  {
858  seq_.push_back (T ());
859  operator[] (0).move (t);
860  }
861 
863  void
864  pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
865  {
866  for (; 0 < n; --n)
867  seq_.pop_back ();
868  }
869 
871  void
872  clear () YY_NOEXCEPT
873  {
874  seq_.clear ();
875  }
876 
878  index_type
879  size () const YY_NOEXCEPT
880  {
881  return index_type (seq_.size ());
882  }
883 
885  const_iterator
886  begin () const YY_NOEXCEPT
887  {
888  return seq_.begin ();
889  }
890 
892  const_iterator
893  end () const YY_NOEXCEPT
894  {
895  return seq_.end ();
896  }
897 
899  class slice
900  {
901  public:
902  slice (const stack& stack, index_type range) YY_NOEXCEPT
903  : stack_ (stack)
904  , range_ (range)
905  {}
906 
907  const T&
908  operator[] (index_type i) const
909  {
910  return stack_[range_ - i];
911  }
912 
913  private:
914  const stack& stack_;
915  index_type range_;
916  };
917 
918  private:
919 #if YY_CPLUSPLUS < 201103L
921  stack (const stack&);
923  stack& operator= (const stack&);
924 #endif
926  S seq_;
927  };
928 
929 
931  typedef stack<stack_symbol_type> stack_type;
932 
934  stack_type yystack_;
935 
941  void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
942 
949  void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
950 
952  void yypop_ (int n = 1) YY_NOEXCEPT;
953 
955  enum
956  {
957  yylast_ = 2385,
958  yynnts_ = 23,
959  yyfinal_ = 79
960  };
961 
962 
963  // User arguments.
964  spot::parse_error_list &error_list;
965  spot::environment &parse_environment;
966  spot::formula &result;
967 
968  };
969 
970 
971 } // tlyy
972 #line 973 "parsetl.hh"
973 
974 
975 
976 
977 #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:630
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:900
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:453
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:608
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:450
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:463
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:523
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:502
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:508
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:526
bool empty() const
Whether empty.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:494
Base super_type
Alias to Base.
Definition: parsetl.hh:465
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:468
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:537
symbol_kind_type kind_
Definition: parsetl.hh:572
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:539
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:580
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