spot  2.10.1
parsetl.hh
Go to the documentation of this file.
1 // A Bison parser, made by GNU Bison 3.7.5.
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 <http://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 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
131 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
132 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
133  _Pragma ("GCC diagnostic push") \
134  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
135  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
136 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
137  _Pragma ("GCC diagnostic pop")
138 #else
139 # define YY_INITIAL_VALUE(Value) Value
140 #endif
141 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
142 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
143 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
144 #endif
145 #ifndef YY_INITIAL_VALUE
146 # define YY_INITIAL_VALUE(Value) /* Nothing. */
147 #endif
148 
149 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
150 # define YY_IGNORE_USELESS_CAST_BEGIN \
151  _Pragma ("GCC diagnostic push") \
152  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
153 # define YY_IGNORE_USELESS_CAST_END \
154  _Pragma ("GCC diagnostic pop")
155 #endif
156 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
157 # define YY_IGNORE_USELESS_CAST_BEGIN
158 # define YY_IGNORE_USELESS_CAST_END
159 #endif
160 
161 # ifndef YY_CAST
162 # ifdef __cplusplus
163 # define YY_CAST(Type, Val) static_cast<Type> (Val)
164 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
165 # else
166 # define YY_CAST(Type, Val) ((Type) (Val))
167 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
168 # endif
169 # endif
170 # ifndef YY_NULLPTR
171 # if defined __cplusplus
172 # if 201103L <= __cplusplus
173 # define YY_NULLPTR nullptr
174 # else
175 # define YY_NULLPTR 0
176 # endif
177 # else
178 # define YY_NULLPTR ((void*)0)
179 # endif
180 # endif
181 
182 /* Debug traces. */
183 #ifndef TLYYDEBUG
184 # if defined YYDEBUG
185 #if YYDEBUG
186 # define TLYYDEBUG 1
187 # else
188 # define TLYYDEBUG 0
189 # endif
190 # else /* ! defined YYDEBUG */
191 # define TLYYDEBUG 1
192 # endif /* ! defined YYDEBUG */
193 #endif /* ! defined TLYYDEBUG */
194 
195 namespace tlyy {
196 #line 197 "parsetl.hh"
197 
198 
199 
200 
202  class parser
203  {
204  public:
205 #ifndef TLYYSTYPE
208  {
209 #line 52 "parsetl.yy"
210 
211  std::string* str;
212  const spot::fnode* ltl;
213  unsigned num;
214  minmax_t minmax;
215 
216 #line 217 "parsetl.hh"
217 
218  };
219 #else
220  typedef TLYYSTYPE semantic_type;
221 #endif
223  typedef spot::location location_type;
224 
226  struct syntax_error : std::runtime_error
227  {
228  syntax_error (const location_type& l, const std::string& m)
229  : std::runtime_error (m)
230  , location (l)
231  {}
232 
233  syntax_error (const syntax_error& s)
234  : std::runtime_error (s.what ())
235  , location (s.location)
236  {}
237 
238  ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
239 
240  location_type location;
241  };
242 
244  struct token
245  {
246  enum token_kind_type
247  {
248  TLYYEMPTY = -2,
249  TLYYEOF = 0, // "end of file"
250  TLYYerror = 256, // error
251  TLYYUNDEF = 257, // "invalid token"
252  START_LTL = 258, // "LTL start marker"
253  START_LBT = 259, // "LBT start marker"
254  START_SERE = 260, // "SERE start marker"
255  START_BOOL = 261, // "BOOLEAN start marker"
256  PAR_OPEN = 262, // "opening parenthesis"
257  PAR_CLOSE = 263, // "closing parenthesis"
258  PAR_BLOCK = 264, // "(...) block"
259  BRA_BLOCK = 265, // "{...} block"
260  BRA_BANG_BLOCK = 266, // "{...}! block"
261  BRACE_OPEN = 267, // "opening brace"
262  BRACE_CLOSE = 268, // "closing brace"
263  BRACE_BANG_CLOSE = 269, // "closing brace-bang"
264  OP_OR = 270, // "or operator"
265  OP_XOR = 271, // "xor operator"
266  OP_AND = 272, // "and operator"
267  OP_SHORT_AND = 273, // "short and operator"
268  OP_IMPLIES = 274, // "implication operator"
269  OP_EQUIV = 275, // "equivalent operator"
270  OP_U = 276, // "until operator"
271  OP_R = 277, // "release operator"
272  OP_W = 278, // "weak until operator"
273  OP_M = 279, // "strong release operator"
274  OP_F = 280, // "sometimes operator"
275  OP_G = 281, // "always operator"
276  OP_X = 282, // "next operator"
277  OP_STRONG_X = 283, // "strong next operator"
278  OP_NOT = 284, // "not operator"
279  OP_XREP = 285, // "X[.] operator"
280  OP_FREP = 286, // "F[.] operator"
281  OP_GREP = 287, // "G[.] operator"
282  OP_STAR = 288, // "star operator"
283  OP_BSTAR = 289, // "bracket star operator"
284  OP_BFSTAR = 290, // "bracket fusion-star operator"
285  OP_PLUS = 291, // "plus operator"
286  OP_FPLUS = 292, // "fusion-plus operator"
287  OP_STAR_OPEN = 293, // "opening bracket for star operator"
288  OP_FSTAR_OPEN = 294, // "opening bracket for fusion-star operator"
289  OP_EQUAL_OPEN = 295, // "opening bracket for equal operator"
290  OP_GOTO_OPEN = 296, // "opening bracket for goto operator"
291  OP_SQBKT_CLOSE = 297, // "closing bracket"
292  OP_SQBKT_STRONG_CLOSE = 298, // "closing !]"
293  OP_SQBKT_NUM = 299, // "number for square bracket operator"
294  OP_UNBOUNDED = 300, // "unbounded mark"
295  OP_SQBKT_SEP = 301, // "separator for square bracket operator"
296  OP_UCONCAT = 302, // "universal concat operator"
297  OP_ECONCAT = 303, // "existential concat operator"
298  OP_UCONCAT_NONO = 304, // "universal non-overlapping concat operator"
299  OP_ECONCAT_NONO = 305, // "existential non-overlapping concat operator"
300  OP_FIRST_MATCH = 306, // "first_match"
301  ATOMIC_PROP = 307, // "atomic proposition"
302  OP_CONCAT = 308, // "concat operator"
303  OP_FUSION = 309, // "fusion operator"
304  CONST_TRUE = 310, // "constant true"
305  CONST_FALSE = 311, // "constant false"
306  END_OF_INPUT = 312, // "end of formula"
307  OP_POST_NEG = 313, // "negative suffix"
308  OP_POST_POS = 314, // "positive suffix"
309  OP_DELAY_N = 315, // "SVA delay operator"
310  OP_DELAY_OPEN = 316, // "opening bracket for SVA delay operator"
311  OP_DELAY_PLUS = 317, // "##[+] operator"
312  OP_DELAY_STAR = 318 // "##[*] operator"
313  };
315  typedef token_kind_type yytokentype;
316  };
317 
319  typedef token::yytokentype token_kind_type;
320 
322  typedef token_kind_type token_type;
323 
325  struct symbol_kind
326  {
328  {
329  YYNTOKENS = 80,
330  S_YYEMPTY = -2,
331  S_YYEOF = 0, // "end of file"
332  S_YYerror = 1, // error
333  S_YYUNDEF = 2, // "invalid token"
334  S_START_LTL = 3, // "LTL start marker"
335  S_START_LBT = 4, // "LBT start marker"
336  S_START_SERE = 5, // "SERE start marker"
337  S_START_BOOL = 6, // "BOOLEAN start marker"
338  S_PAR_OPEN = 7, // "opening parenthesis"
339  S_PAR_CLOSE = 8, // "closing parenthesis"
340  S_PAR_BLOCK = 9, // "(...) block"
341  S_BRA_BLOCK = 10, // "{...} block"
342  S_BRA_BANG_BLOCK = 11, // "{...}! block"
343  S_BRACE_OPEN = 12, // "opening brace"
344  S_BRACE_CLOSE = 13, // "closing brace"
345  S_BRACE_BANG_CLOSE = 14, // "closing brace-bang"
346  S_OP_OR = 15, // "or operator"
347  S_OP_XOR = 16, // "xor operator"
348  S_OP_AND = 17, // "and operator"
349  S_OP_SHORT_AND = 18, // "short and operator"
350  S_OP_IMPLIES = 19, // "implication operator"
351  S_OP_EQUIV = 20, // "equivalent operator"
352  S_OP_U = 21, // "until operator"
353  S_OP_R = 22, // "release operator"
354  S_OP_W = 23, // "weak until operator"
355  S_OP_M = 24, // "strong release operator"
356  S_OP_F = 25, // "sometimes operator"
357  S_OP_G = 26, // "always operator"
358  S_OP_X = 27, // "next operator"
359  S_OP_STRONG_X = 28, // "strong next operator"
360  S_OP_NOT = 29, // "not operator"
361  S_OP_XREP = 30, // "X[.] operator"
362  S_OP_FREP = 31, // "F[.] operator"
363  S_OP_GREP = 32, // "G[.] operator"
364  S_OP_STAR = 33, // "star operator"
365  S_OP_BSTAR = 34, // "bracket star operator"
366  S_OP_BFSTAR = 35, // "bracket fusion-star operator"
367  S_OP_PLUS = 36, // "plus operator"
368  S_OP_FPLUS = 37, // "fusion-plus operator"
369  S_OP_STAR_OPEN = 38, // "opening bracket for star operator"
370  S_OP_FSTAR_OPEN = 39, // "opening bracket for fusion-star operator"
371  S_OP_EQUAL_OPEN = 40, // "opening bracket for equal operator"
372  S_OP_GOTO_OPEN = 41, // "opening bracket for goto operator"
373  S_OP_SQBKT_CLOSE = 42, // "closing bracket"
374  S_OP_SQBKT_STRONG_CLOSE = 43, // "closing !]"
375  S_OP_SQBKT_NUM = 44, // "number for square bracket operator"
376  S_OP_UNBOUNDED = 45, // "unbounded mark"
377  S_OP_SQBKT_SEP = 46, // "separator for square bracket operator"
378  S_OP_UCONCAT = 47, // "universal concat operator"
379  S_OP_ECONCAT = 48, // "existential concat operator"
380  S_OP_UCONCAT_NONO = 49, // "universal non-overlapping concat operator"
381  S_OP_ECONCAT_NONO = 50, // "existential non-overlapping concat operator"
382  S_OP_FIRST_MATCH = 51, // "first_match"
383  S_ATOMIC_PROP = 52, // "atomic proposition"
384  S_OP_CONCAT = 53, // "concat operator"
385  S_OP_FUSION = 54, // "fusion operator"
386  S_CONST_TRUE = 55, // "constant true"
387  S_CONST_FALSE = 56, // "constant false"
388  S_END_OF_INPUT = 57, // "end of formula"
389  S_OP_POST_NEG = 58, // "negative suffix"
390  S_OP_POST_POS = 59, // "positive suffix"
391  S_OP_DELAY_N = 60, // "SVA delay operator"
392  S_OP_DELAY_OPEN = 61, // "opening bracket for SVA delay operator"
393  S_OP_DELAY_PLUS = 62, // "##[+] operator"
394  S_OP_DELAY_STAR = 63, // "##[*] operator"
395  S_64_ = 64, // '!'
396  S_65_ = 65, // '&'
397  S_66_ = 66, // '|'
398  S_67_ = 67, // '^'
399  S_68_i_ = 68, // 'i'
400  S_69_e_ = 69, // 'e'
401  S_70_X_ = 70, // 'X'
402  S_71_F_ = 71, // 'F'
403  S_72_G_ = 72, // 'G'
404  S_73_U_ = 73, // 'U'
405  S_74_V_ = 74, // 'V'
406  S_75_R_ = 75, // 'R'
407  S_76_W_ = 76, // 'W'
408  S_77_M_ = 77, // 'M'
409  S_78_t_ = 78, // 't'
410  S_79_f_ = 79, // 'f'
411  S_YYACCEPT = 80, // $accept
412  S_result = 81, // result
413  S_emptyinput = 82, // emptyinput
414  S_enderror = 83, // enderror
415  S_OP_SQBKT_SEP_unbounded = 84, // OP_SQBKT_SEP_unbounded
416  S_OP_SQBKT_SEP_opt = 85, // OP_SQBKT_SEP_opt
417  S_error_opt = 86, // error_opt
418  S_sqbkt_num = 87, // sqbkt_num
419  S_sqbracketargs = 88, // sqbracketargs
420  S_gotoargs = 89, // gotoargs
421  S_kleen_star = 90, // kleen_star
422  S_starargs = 91, // starargs
423  S_fstarargs = 92, // fstarargs
424  S_equalargs = 93, // equalargs
425  S_delayargs = 94, // delayargs
426  S_atomprop = 95, // atomprop
427  S_booleanatom = 96, // booleanatom
428  S_sere = 97, // sere
429  S_bracedsere = 98, // bracedsere
430  S_parenthesedsubformula = 99, // parenthesedsubformula
431  S_boolformula = 100, // boolformula
432  S_subformula = 101, // subformula
433  S_lbtformula = 102 // lbtformula
434  };
435  };
436 
439 
442 
449  template <typename Base>
450  struct basic_symbol : Base
451  {
453  typedef Base super_type;
454 
457  : value ()
458  , location ()
459  {}
460 
461 #if 201103L <= YY_CPLUSPLUS
463  basic_symbol (basic_symbol&& that)
464  : Base (std::move (that))
465  , value (std::move (that.value))
466  , location (std::move (that.location))
467  {}
468 #endif
469 
471  basic_symbol (const basic_symbol& that);
473  basic_symbol (typename Base::kind_type t,
474  YY_MOVE_REF (location_type) l);
475 
477  basic_symbol (typename Base::kind_type t,
478  YY_RVREF (semantic_type) v,
479  YY_RVREF (location_type) l);
480 
483  {
484  clear ();
485  }
486 
488  void clear () YY_NOEXCEPT
489  {
490  Base::clear ();
491  }
492 
494  std::string name () const YY_NOEXCEPT
495  {
496  return parser::symbol_name (this->kind ());
497  }
498 
500  symbol_kind_type type_get () const YY_NOEXCEPT;
501 
503  bool empty () const YY_NOEXCEPT;
504 
506  void move (basic_symbol& s);
507 
510 
513 
514  private:
515 #if YY_CPLUSPLUS < 201103L
517  basic_symbol& operator= (const basic_symbol& that);
518 #endif
519  };
520 
522  struct by_kind
523  {
526 
527 #if 201103L <= YY_CPLUSPLUS
529  by_kind (by_kind&& that);
530 #endif
531 
533  by_kind (const by_kind& that);
534 
536  typedef token_kind_type kind_type;
537 
539  by_kind (kind_type t);
540 
542  void clear () YY_NOEXCEPT;
543 
545  void move (by_kind& that);
546 
549  symbol_kind_type kind () const YY_NOEXCEPT;
550 
552  symbol_kind_type type_get () const YY_NOEXCEPT;
553 
557  };
558 
560  typedef by_kind by_type;
561 
564  {};
565 
567  parser (spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg);
568  virtual ~parser ();
569 
570 #if 201103L <= YY_CPLUSPLUS
572  parser (const parser&) = delete;
574  parser& operator= (const parser&) = delete;
575 #endif
576 
579  int operator() ();
580 
583  virtual int parse ();
584 
585 #if TLYYDEBUG
587  std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
589  void set_debug_stream (std::ostream &);
590 
592  typedef int debug_level_type;
594  debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
597 #endif
598 
602  virtual void error (const location_type& loc, const std::string& msg);
603 
605  void error (const syntax_error& err);
606 
609  static std::string symbol_name (symbol_kind_type yysymbol);
610 
611 
612 
613  class context
614  {
615  public:
616  context (const parser& yyparser, const symbol_type& yyla);
617  const symbol_type& lookahead () const YY_NOEXCEPT { return yyla_; }
618  symbol_kind_type token () const YY_NOEXCEPT { return yyla_.kind (); }
619  const location_type& location () const YY_NOEXCEPT { return yyla_.location; }
620 
624  int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
625 
626  private:
627  const parser& yyparser_;
628  const symbol_type& yyla_;
629  };
630 
631  private:
632 #if YY_CPLUSPLUS < 201103L
634  parser (const parser&);
636  parser& operator= (const parser&);
637 #endif
638 
639 
641  typedef short state_type;
642 
644  int yy_syntax_error_arguments_ (const context& yyctx,
645  symbol_kind_type yyarg[], int yyargn) const;
646 
649  virtual std::string yysyntax_error_ (const context& yyctx) const;
653  static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
654 
657  static bool yy_pact_value_is_default_ (int yyvalue);
658 
661  static bool yy_table_value_is_error_ (int yyvalue);
662 
663  static const signed char yypact_ninf_;
664  static const signed char yytable_ninf_;
665 
669  static symbol_kind_type yytranslate_ (int t);
670 
672  static std::string yytnamerr_ (const char *yystr);
673 
675  static const char* const yytname_[];
676 
677 
678  // Tables.
679  // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
680  // STATE-NUM.
681  static const short yypact_[];
682 
683  // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
684  // Performed when YYTABLE does not specify something else to do. Zero
685  // means the default is an error.
686  static const unsigned char yydefact_[];
687 
688  // YYPGOTO[NTERM-NUM].
689  static const short yypgoto_[];
690 
691  // YYDEFGOTO[NTERM-NUM].
692  static const unsigned char yydefgoto_[];
693 
694  // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
695  // positive, shift that token. If negative, reduce the rule whose
696  // number is the opposite. If YYTABLE_NINF, syntax error.
697  static const short yytable_[];
698 
699  static const short yycheck_[];
700 
701  // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
702  // symbol of state STATE-NUM.
703  static const signed char yystos_[];
704 
705  // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
706  static const signed char yyr1_[];
707 
708  // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
709  static const signed char yyr2_[];
710 
711 
712 #if TLYYDEBUG
713  // YYRLINE[YYN] -- Source line where rule number YYN was defined.
714  static const short yyrline_[];
716  virtual void yy_reduce_print_ (int r) const;
718  virtual void yy_stack_print_ () const;
719 
721  int yydebug_;
723  std::ostream* yycdebug_;
724 
728  template <typename Base>
729  void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
730 #endif
731 
736  template <typename Base>
737  void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
738 
739  private:
741  struct by_state
742  {
744  by_state () YY_NOEXCEPT;
745 
747  typedef state_type kind_type;
748 
750  by_state (kind_type s) YY_NOEXCEPT;
751 
753  by_state (const by_state& that) YY_NOEXCEPT;
754 
756  void clear () YY_NOEXCEPT;
757 
759  void move (by_state& that);
760 
763  symbol_kind_type kind () const YY_NOEXCEPT;
764 
767  enum { empty_state = 0 };
768 
771  state_type state;
772  };
773 
775  struct stack_symbol_type : basic_symbol<by_state>
776  {
778  typedef basic_symbol<by_state> super_type;
780  stack_symbol_type ();
782  stack_symbol_type (YY_RVREF (stack_symbol_type) that);
784  stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
785 #if YY_CPLUSPLUS < 201103L
788  stack_symbol_type& operator= (stack_symbol_type& that);
789 
792  stack_symbol_type& operator= (const stack_symbol_type& that);
793 #endif
794  };
795 
797  template <typename T, typename S = std::vector<T> >
798  class stack
799  {
800  public:
801  // Hide our reversed order.
802  typedef typename S::iterator iterator;
803  typedef typename S::const_iterator const_iterator;
804  typedef typename S::size_type size_type;
805  typedef typename std::ptrdiff_t index_type;
806 
807  stack (size_type n = 200)
808  : seq_ (n)
809  {}
810 
811 #if 201103L <= YY_CPLUSPLUS
813  stack (const stack&) = delete;
815  stack& operator= (const stack&) = delete;
816 #endif
817 
821  const T&
822  operator[] (index_type i) const
823  {
824  return seq_[size_type (size () - 1 - i)];
825  }
826 
830  T&
831  operator[] (index_type i)
832  {
833  return seq_[size_type (size () - 1 - i)];
834  }
835 
839  void
840  push (YY_MOVE_REF (T) t)
841  {
842  seq_.push_back (T ());
843  operator[] (0).move (t);
844  }
845 
847  void
848  pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
849  {
850  for (; 0 < n; --n)
851  seq_.pop_back ();
852  }
853 
855  void
856  clear () YY_NOEXCEPT
857  {
858  seq_.clear ();
859  }
860 
862  index_type
863  size () const YY_NOEXCEPT
864  {
865  return index_type (seq_.size ());
866  }
867 
869  const_iterator
870  begin () const YY_NOEXCEPT
871  {
872  return seq_.begin ();
873  }
874 
876  const_iterator
877  end () const YY_NOEXCEPT
878  {
879  return seq_.end ();
880  }
881 
883  class slice
884  {
885  public:
886  slice (const stack& stack, index_type range)
887  : stack_ (stack)
888  , range_ (range)
889  {}
890 
891  const T&
892  operator[] (index_type i) const
893  {
894  return stack_[range_ - i];
895  }
896 
897  private:
898  const stack& stack_;
899  index_type range_;
900  };
901 
902  private:
903 #if YY_CPLUSPLUS < 201103L
905  stack (const stack&);
907  stack& operator= (const stack&);
908 #endif
910  S seq_;
911  };
912 
913 
915  typedef stack<stack_symbol_type> stack_type;
916 
918  stack_type yystack_;
919 
925  void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
926 
933  void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
934 
936  void yypop_ (int n = 1);
937 
939  enum
940  {
941  yylast_ = 2385,
942  yynnts_ = 23,
943  yyfinal_ = 79
944  };
945 
946 
947  // User arguments.
948  spot::parse_error_list &error_list;
949  spot::environment &parse_environment;
950  spot::formula &result;
951 
952  };
953 
954 
955 } // tlyy
956 #line 957 "parsetl.hh"
957 
958 
959 
960 
961 #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:614
int expected_tokens(symbol_kind_type yyarg[], int yyargn) const
Present a slice of the top of a stack.
Definition: parsetl.hh:884
A Bison parser.
Definition: parsetl.hh:203
parser(spot::parse_error_list &error_list_yyarg, spot::environment &parse_environment_yyarg, spot::formula &result_yyarg)
Build a parser object.
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:441
int debug_level_type
Type for debugging levels.
Definition: parsetl.hh:592
symbol_kind::symbol_kind_type symbol_kind_type
(Internal) symbol kind.
Definition: parsetl.hh:438
virtual void error(const location_type &loc, const std::string &msg)
int operator()()
void set_debug_stream(std::ostream &)
Set the current debugging stream.
token::yytokentype token_kind_type
Token kind, as returned by yylex.
Definition: parsetl.hh:319
debug_level_type debug_level() const
The current debugging level.
token_kind_type token_type
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:322
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:223
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:451
basic_symbol(typename Base::kind_type t, location_type &l)
Constructor for valueless symbols.
basic_symbol(const basic_symbol &that)
Copy constructor.
semantic_type value
The semantic value.
Definition: parsetl.hh:509
symbol_kind_type type_get() const
Backward compatibility (Bison 3.6).
void clear()
Destroy contents, and record that is empty.
Definition: parsetl.hh:488
std::string name() const
The user-facing name of this symbol.
Definition: parsetl.hh:494
location_type location
The location.
Definition: parsetl.hh:512
bool empty() const
Whether empty.
basic_symbol(typename Base::kind_type t, const semantic_type &v, const location_type &l)
Constructor for symbols with semantic value.
~basic_symbol()
Destroy the symbol.
Definition: parsetl.hh:482
Base super_type
Alias to Base.
Definition: parsetl.hh:453
void move(basic_symbol &s)
Destructive move, s is emptied into this.
basic_symbol()
Default constructor.
Definition: parsetl.hh:456
Type access provider for token (enum) based symbols.
Definition: parsetl.hh:523
symbol_kind_type kind_
Definition: parsetl.hh:556
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:536
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:326
symbol_kind_type
Definition: parsetl.hh:328
@ YYNTOKENS
Number of tokens.
Definition: parsetl.hh:329
"External" symbols: returned by the scanner.
Definition: parsetl.hh:564
Syntax errors thrown from user actions.
Definition: parsetl.hh:227
Token kinds.
Definition: parsetl.hh:245
token_kind_type yytokentype
Backward compatibility alias (Bison 3.6).
Definition: parsetl.hh:315
Symbol semantic values.
Definition: parsetl.hh:208

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