Aprepro  5.0x
aprepro_parser.h
Go to the documentation of this file.
1 // A Bison parser, made by GNU Bison 3.4.
2 
3 // Skeleton interface for Bison LALR(1) parsers in C++
4 
5 // Copyright (C) 2002-2015, 2018-2019 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 /**
34  ** \file aprepro_parser.h
35  ** Define the SEAMS::parser class.
36  */
37 
38 // C++ LALR(1) parser skeleton written by Akim Demaille.
39 
40 // Undocumented macros, especially those whose name start with YY_,
41 // are private implementation details. Do not rely on them.
42 
43 #ifndef YY_SEAMS_APREPRO_PARSER_H_INCLUDED
44 #define YY_SEAMS_APREPRO_PARSER_H_INCLUDED
45 
46 #include <cstdlib> // std::abort
47 #include <iostream>
48 #include <stdexcept>
49 #include <string>
50 #include <vector>
51 
52 #if defined __cplusplus
53 #define YY_CPLUSPLUS __cplusplus
54 #else
55 #define YY_CPLUSPLUS 199711L
56 #endif
57 
58 // Support move semantics when possible.
59 #if 201103L <= YY_CPLUSPLUS
60 #define YY_MOVE std::move
61 #define YY_MOVE_OR_COPY move
62 #define YY_MOVE_REF(Type) Type &&
63 #define YY_RVREF(Type) Type &&
64 #define YY_COPY(Type) Type
65 #else
66 #define YY_MOVE
67 #define YY_MOVE_OR_COPY copy
68 #define YY_MOVE_REF(Type) Type &
69 #define YY_RVREF(Type) const Type &
70 #define YY_COPY(Type) const Type &
71 #endif
72 
73 // Support noexcept when possible.
74 #if 201103L <= YY_CPLUSPLUS
75 #define YY_NOEXCEPT noexcept
76 #define YY_NOTHROW
77 #else
78 #define YY_NOEXCEPT
79 #define YY_NOTHROW throw()
80 #endif
81 
82 // Support constexpr when possible.
83 #if 201703 <= YY_CPLUSPLUS
84 #define YY_CONSTEXPR constexpr
85 #else
86 #define YY_CONSTEXPR
87 #endif
88 
89 #ifndef YY_ATTRIBUTE
90 #if (defined __GNUC__ && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) || \
91  defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
92 #define YY_ATTRIBUTE(Spec) __attribute__(Spec)
93 #else
94 #define YY_ATTRIBUTE(Spec) /* empty */
95 #endif
96 #endif
97 
98 #ifndef YY_ATTRIBUTE_PURE
99 #define YY_ATTRIBUTE_PURE YY_ATTRIBUTE((__pure__))
100 #endif
101 
102 #ifndef YY_ATTRIBUTE_UNUSED
103 #define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE((__unused__))
104 #endif
105 
106 /* Suppress unused-variable warnings by "using" E. */
107 #if !defined lint || defined __GNUC__
108 #define YYUSE(E) ((void)(E))
109 #else
110 #define YYUSE(E) /* empty */
111 #endif
112 
113 #if defined __GNUC__ && !defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
114 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
115 #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
116  _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"") \
117  _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
118 #define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")
119 #else
120 #define YY_INITIAL_VALUE(Value) Value
121 #endif
122 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
123 #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
124 #define YY_IGNORE_MAYBE_UNINITIALIZED_END
125 #endif
126 #ifndef YY_INITIAL_VALUE
127 #define YY_INITIAL_VALUE(Value) /* Nothing. */
128 #endif
129 
130 #ifndef YY_NULLPTR
131 #if defined __cplusplus
132 #if 201103L <= __cplusplus
133 #define YY_NULLPTR nullptr
134 #else
135 #define YY_NULLPTR 0
136 #endif
137 #else
138 #define YY_NULLPTR ((void *)0)
139 #endif
140 #endif
141 
142 /* Debug traces. */
143 #ifndef SEAMSDEBUG
144 #if defined YYDEBUG
145 #if YYDEBUG
146 #define SEAMSDEBUG 1
147 #else
148 #define SEAMSDEBUG 0
149 #endif
150 #else /* ! defined YYDEBUG */
151 #define SEAMSDEBUG 1
152 #endif /* ! defined YYDEBUG */
153 #endif /* ! defined SEAMSDEBUG */
154 
155 namespace SEAMS {
156 #line 164 "aprepro_parser.h"
157 
158  /// A Bison parser.
159  class Parser
160  {
161  public:
162 #ifndef SEAMSSTYPE
163  /// Symbol semantic values.
165 #line 89 "aprepro.yy"
166 
167  double val; /* For returning numbers. */
168  struct symrec *tptr; /* For returning symbol-table pointers */
169  char * string; /* For returning quoted strings */
170  struct array * arrval; /* For returning arrays */
171 
172 #line 184 "aprepro_parser.h"
173  };
174 #else
175  typedef SEAMSSTYPE semantic_type;
176 #endif
177 
178  /// Syntax errors thrown from user actions.
179  struct syntax_error : std::runtime_error
180  {
181  syntax_error(const std::string &m) : std::runtime_error(m) {}
182 
183  syntax_error(const syntax_error &s) : std::runtime_error(s.what()) {}
184 
186  };
187 
188  /// Tokens.
189  struct token
190  {
191  enum yytokentype {
192  END = 0,
193  NUM = 258,
194  QSTRING = 259,
195  UNDVAR = 260,
196  VAR = 261,
197  SVAR = 262,
198  IMMVAR = 263,
199  IMMSVAR = 264,
200  AVAR = 265,
201  FNCT = 266,
202  SFNCT = 267,
203  AFNCT = 268,
204  COMMA = 269,
205  LPAR = 270,
206  RPAR = 271,
207  LBRACK = 272,
208  RBRACK = 273,
209  LBRACE = 274,
210  RBRACE = 275,
211  SEMI = 276,
212  EQUAL = 277,
213  EQ_PLUS = 278,
214  EQ_MINUS = 279,
215  EQ_TIME = 280,
216  EQ_DIV = 281,
217  EQ_POW = 282,
218  QUEST = 283,
219  COLON = 284,
220  LOR = 285,
221  LAND = 286,
222  LT = 287,
223  GT = 288,
224  LE = 289,
225  GE = 290,
226  EQ = 291,
227  NE = 292,
228  PLU = 293,
229  SUB = 294,
230  DIV = 295,
231  TIM = 296,
232  MOD = 297,
233  UNARY = 298,
234  NOT = 299,
235  POW = 300,
236  INC = 301,
237  DEC = 302,
238  CONCAT = 303
239  };
240  };
241 
242  /// (External) token type, as returned by yylex.
244 
245  /// Symbol type: an internal symbol number.
246  typedef int symbol_number_type;
247 
248  /// The symbol type number to denote an empty symbol.
249  enum { empty_symbol = -2 };
250 
251  /// Internal symbol number for tokens (subsumed by symbol_number_type).
252  typedef unsigned char token_number_type;
253 
254  /// A complete symbol.
255  ///
256  /// Expects its Base type to provide access to the symbol type
257  /// via type_get ().
258  ///
259  /// Provide access to semantic value.
260  template <typename Base> struct basic_symbol : Base
261  {
262  /// Alias to Base.
263  typedef Base super_type;
264 
265  /// Default constructor.
266  basic_symbol() : value() {}
267 
268 #if 201103L <= YY_CPLUSPLUS
269  /// Move constructor.
270  basic_symbol(basic_symbol &&that);
271 #endif
272 
273  /// Copy constructor.
274  basic_symbol(const basic_symbol &that);
275  /// Constructor for valueless symbols.
276  basic_symbol(typename Base::kind_type t);
277 
278  /// Constructor for symbols with semantic value.
279  basic_symbol(typename Base::kind_type t, YY_RVREF(semantic_type) v);
280 
281  /// Destroy the symbol.
282  ~basic_symbol() { clear(); }
283 
284  /// Destroy contents, and record that is empty.
285  void clear() { Base::clear(); }
286 
287  /// Whether empty.
288  bool empty() const YY_NOEXCEPT;
289 
290  /// Destructive move, \a s is emptied into this.
291  void move(basic_symbol &s);
292 
293  /// The semantic value.
295 
296  private:
297 #if YY_CPLUSPLUS < 201103L
298  /// Assignment operator.
299  basic_symbol &operator=(const basic_symbol &that);
300 #endif
301  };
302 
303  /// Type access provider for token (enum) based symbols.
304  struct by_type
305  {
306  /// Default constructor.
307  by_type();
308 
309 #if 201103L <= YY_CPLUSPLUS
310  /// Move constructor.
311  by_type(by_type &&that);
312 #endif
313 
314  /// Copy constructor.
315  by_type(const by_type &that);
316 
317  /// The symbol type as needed by the constructor.
319 
320  /// Constructor from (external) token numbers.
321  by_type(kind_type t);
322 
323  /// Record that this symbol is empty.
324  void clear();
325 
326  /// Steal the symbol type from \a that.
327  void move(by_type &that);
328 
329  /// The (internal) type number (corresponding to \a type).
330  /// \a empty when empty.
331  symbol_number_type type_get() const YY_NOEXCEPT;
332 
333  /// The token.
334  token_type token() const YY_NOEXCEPT;
335 
336  /// The symbol type.
337  /// \a empty_symbol when empty.
338  /// An int, not token_number_type, to be able to store empty_symbol.
339  int type;
340  };
341 
342  /// "External" symbols: returned by the scanner.
344  {
345  };
346 
347  /// Build a parser object.
348  Parser(class Aprepro &aprepro_yyarg);
349  virtual ~Parser();
350 
351  /// Parse. An alias for parse ().
352  /// \returns 0 iff parsing succeeded.
353  int operator()();
354 
355  /// Parse.
356  /// \returns 0 iff parsing succeeded.
357  virtual int parse();
358 
359 #if SEAMSDEBUG
360  /// The current debugging stream.
361  std::ostream &debug_stream() const YY_ATTRIBUTE_PURE;
362  /// Set the current debugging stream.
363  void set_debug_stream(std::ostream &);
364 
365  /// Type for debugging levels.
366  typedef int debug_level_type;
367  /// The current debugging level.
369  /// Set the current debugging level.
371 #endif
372 
373  /// Report a syntax error.
374  /// \param msg a description of the syntax error.
375  virtual void error(const std::string &msg);
376 
377  /// Report a syntax error.
378  void error(const syntax_error &err);
379 
380  private:
381  /// This class is not copiable.
382  Parser(const Parser &);
383  Parser &operator=(const Parser &);
384 
385  /// State numbers.
386  typedef int state_type;
387 
388  /// Generate an error message.
389  /// \param yystate the state where the error occurred.
390  /// \param yyla the lookahead token.
391  virtual std::string yysyntax_error_(state_type yystate, const symbol_type &yyla) const;
392 
393  /// Compute post-reduction state.
394  /// \param yystate the current state
395  /// \param yysym the nonterminal to push on the stack
396  state_type yy_lr_goto_state_(state_type yystate, int yysym);
397 
398  /// Whether the given \c yypact_ value indicates a defaulted state.
399  /// \param yyvalue the value to check
400  static bool yy_pact_value_is_default_(int yyvalue);
401 
402  /// Whether the given \c yytable_ value indicates a syntax error.
403  /// \param yyvalue the value to check
404  static bool yy_table_value_is_error_(int yyvalue);
405 
406  static const signed char yypact_ninf_;
407  static const signed char yytable_ninf_;
408 
409  /// Convert a scanner token number \a t to a symbol number.
410  static token_number_type yytranslate_(int t);
411 
412  // Tables.
413  // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
414  // STATE-NUM.
415  static const short yypact_[];
416 
417  // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
418  // Performed when YYTABLE does not specify something else to do. Zero
419  // means the default is an error.
420  static const unsigned char yydefact_[];
421 
422  // YYPGOTO[NTERM-NUM].
423  static const signed char yypgoto_[];
424 
425  // YYDEFGOTO[NTERM-NUM].
426  static const short yydefgoto_[];
427 
428  // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
429  // positive, shift that token. If negative, reduce the rule whose
430  // number is the opposite. If YYTABLE_NINF, syntax error.
431  static const unsigned short yytable_[];
432 
433  static const short yycheck_[];
434 
435  // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
436  // symbol of state STATE-NUM.
437  static const unsigned char yystos_[];
438 
439  // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
440  static const unsigned char yyr1_[];
441 
442  // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
443  static const unsigned char yyr2_[];
444 
445  /// Convert the symbol name \a n to a form suitable for a diagnostic.
446  static std::string yytnamerr_(const char *n);
447 
448  /// For a symbol, its name in clear.
449  static const char *const yytname_[];
450 #if SEAMSDEBUG
451  // YYRLINE[YYN] -- Source line where rule number YYN was defined.
452  static const unsigned short yyrline_[];
453  /// Report on the debug stream that the rule \a r is going to be reduced.
454  virtual void yy_reduce_print_(int r);
455  /// Print the state stack on the debug stream.
456  virtual void yystack_print_();
457 
458  /// Debugging level.
459  int yydebug_;
460  /// Debug stream.
461  std::ostream *yycdebug_;
462 
463  /// \brief Display a symbol type, value and location.
464  /// \param yyo The output stream.
465  /// \param yysym The symbol.
466  template <typename Base>
467  void yy_print_(std::ostream &yyo, const basic_symbol<Base> &yysym) const;
468 #endif
469 
470  /// \brief Reclaim the memory associated to a symbol.
471  /// \param yymsg Why this token is reclaimed.
472  /// If null, print nothing.
473  /// \param yysym The symbol.
474  template <typename Base> void yy_destroy_(const char *yymsg, basic_symbol<Base> &yysym) const;
475 
476  private:
477  /// Type access provider for state based symbols.
478  struct by_state
479  {
480  /// Default constructor.
482 
483  /// The symbol type as needed by the constructor.
485 
486  /// Constructor.
488 
489  /// Copy constructor.
490  by_state(const by_state &that) YY_NOEXCEPT;
491 
492  /// Record that this symbol is empty.
493  void clear() YY_NOEXCEPT;
494 
495  /// Steal the symbol type from \a that.
496  void move(by_state &that);
497 
498  /// The (internal) type number (corresponding to \a state).
499  /// \a empty_symbol when empty.
500  symbol_number_type type_get() const YY_NOEXCEPT;
501 
502  /// The state number used to denote an empty symbol.
503  enum { empty_state = -1 };
504 
505  /// The state.
506  /// \a empty when empty.
508  };
509 
510  /// "Internal" symbol: element of the stack.
511  struct stack_symbol_type : basic_symbol<by_state>
512  {
513  /// Superclass.
515  /// Construct an empty symbol.
517  /// Move or copy construction.
519  /// Steal the contents from \a sym to build this.
521 #if YY_CPLUSPLUS < 201103L
522  /// Assignment, needed by push_back by some old implementations.
523  /// Moves the contents of that.
525 #endif
526  };
527 
528  /// A stack with random access from its top.
529  template <typename T, typename S = std::vector<T>> class stack
530  {
531  public:
532  // Hide our reversed order.
533  typedef typename S::reverse_iterator iterator;
534  typedef typename S::const_reverse_iterator const_iterator;
535  typedef typename S::size_type size_type;
536 
537  stack(size_type n = 200) : seq_(n) {}
538 
539  /// Random access.
540  ///
541  /// Index 0 returns the topmost element.
542  T &operator[](size_type i) { return seq_[size() - 1 - i]; }
543 
544  /// Random access.
545  ///
546  /// Index 0 returns the topmost element.
547  T &operator[](int i) { return operator[](size_type(i)); }
548 
549  /// Random access.
550  ///
551  /// Index 0 returns the topmost element.
552  const T &operator[](size_type i) const { return seq_[size() - 1 - i]; }
553 
554  /// Random access.
555  ///
556  /// Index 0 returns the topmost element.
557  const T &operator[](int i) const { return operator[](size_type(i)); }
558 
559  /// Steal the contents of \a t.
560  ///
561  /// Close to move-semantics.
562  void push(YY_MOVE_REF(T) t)
563  {
564  seq_.push_back(T());
565  operator[](0).move(t);
566  }
567 
568  /// Pop elements from the stack.
569  void pop(int n = 1) YY_NOEXCEPT
570  {
571  for (; 0 < n; --n)
572  seq_.pop_back();
573  }
574 
575  /// Pop all elements from the stack.
576  void clear() YY_NOEXCEPT { seq_.clear(); }
577 
578  /// Number of elements on the stack.
579  size_type size() const YY_NOEXCEPT { return seq_.size(); }
580 
581  /// Iterator on top of the stack (going downwards).
582  const_iterator begin() const YY_NOEXCEPT { return seq_.rbegin(); }
583 
584  /// Bottom of the stack.
585  const_iterator end() const YY_NOEXCEPT { return seq_.rend(); }
586 
587  /// Present a slice of the top of a stack.
588  class slice
589  {
590  public:
591  slice(const stack &stack, int range) : stack_(stack), range_(range) {}
592 
593  const T &operator[](int i) const { return stack_[range_ - i]; }
594 
595  private:
596  const stack &stack_;
597  int range_;
598  };
599 
600  private:
601  stack(const stack &);
602  stack &operator=(const stack &);
603  /// The wrapped container.
604  S seq_;
605  };
606 
607  /// Stack type.
609 
610  /// The stack.
612 
613  /// Push a new state on the stack.
614  /// \param m a debug message to display
615  /// if null, no trace is output.
616  /// \param sym the symbol
617  /// \warning the contents of \a s.value is stolen.
618  void yypush_(const char *m, YY_MOVE_REF(stack_symbol_type) sym);
619 
620  /// Push a new look ahead token on the state on the stack.
621  /// \param m a debug message to display
622  /// if null, no trace is output.
623  /// \param s the state
624  /// \param sym the symbol (for its value and location).
625  /// \warning the contents of \a sym.value is stolen.
626  void yypush_(const char *m, state_type s, YY_MOVE_REF(symbol_type) sym);
627 
628  /// Pop \a n symbols from the stack.
629  void yypop_(int n = 1);
630 
631  /// Constants.
632  enum {
633  yyeof_ = 0,
634  yylast_ = 1315, ///< Last index in yytable_.
635  yynnts_ = 7, ///< Number of nonterminal symbols.
636  yyfinal_ = 2, ///< Termination state number.
638  yyerrcode_ = 256,
639  yyntokens_ = 50 ///< Number of tokens.
640  };
641 
642  // User arguments.
643  class Aprepro &aprepro;
644  };
645 
646 } // namespace SEAMS
647 #line 728 "aprepro_parser.h"
648 
649 #endif // !YY_SEAMS_APREPRO_PARSER_H_INCLUDED
SEAMS::Parser::stack::slice::operator[]
const T & operator[](int i) const
Definition: aprepro_parser.h:593
YY_MOVE_REF
#define YY_MOVE_REF(Type)
Definition: aprepro_parser.h:68
SEAMS::Parser::by_state::state
state_type state
Definition: aprepro_parser.h:507
SEAMS::Parser::yy_reduce_print_
virtual void yy_reduce_print_(int r)
Report on the debug stream that the rule r is going to be reduced.
Definition: apr_parser.cc:2463
SEAMS::Parser::stack::slice::stack_
const stack & stack_
Definition: aprepro_parser.h:596
SEAMS::Parser::yypact_ninf_
static const signed char yypact_ninf_
Definition: aprepro_parser.h:406
SEAMS::Parser::semantic_type
Symbol semantic values.
Definition: aprepro_parser.h:164
SEAMS::Parser::yycdebug_
std::ostream * yycdebug_
Debug stream.
Definition: aprepro_parser.h:461
SEAMS::Parser::yy_pact_value_is_default_
static bool yy_pact_value_is_default_(int yyvalue)
Definition: apr_parser.cc:392
SEAMS::Parser::basic_symbol::~basic_symbol
~basic_symbol()
Destroy the symbol.
Definition: aprepro_parser.h:282
SEAMS
Definition: apr_aprepro.cc:68
SEAMS::Parser::by_type
Type access provider for token (enum) based symbols.
Definition: aprepro_parser.h:304
SEAMS::Parser::syntax_error
Syntax errors thrown from user actions.
Definition: aprepro_parser.h:179
SEAMS::Parser::yydefact_
static const unsigned char yydefact_[]
Definition: aprepro_parser.h:420
SEAMS::Parser::by_state
Type access provider for state based symbols.
Definition: aprepro_parser.h:478
SEAMS::array
Definition: aprepro.h:63
SEAMS::Parser::error
virtual void error(const std::string &msg)
Definition: apr_parser.cc:2510
SEAMS::Parser::token::yytokentype
yytokentype
Definition: aprepro_parser.h:191
SEAMS::Parser::basic_symbol::clear
void clear()
Destroy contents, and record that is empty.
Definition: aprepro_parser.h:285
SEAMS::Parser::set_debug_stream
void set_debug_stream(std::ostream &)
Set the current debugging stream.
Definition: apr_parser.cc:376
SEAMS::Parser::stack::slice::range_
int range_
Definition: aprepro_parser.h:597
SEAMS::Parser::yynnts_
Number of nonterminal symbols.
Definition: aprepro_parser.h:635
SEAMS::Parser::syntax_error::syntax_error
syntax_error(const std::string &m)
Definition: aprepro_parser.h:181
SEAMS::Parser::yyterror_
Definition: aprepro_parser.h:637
SEAMS::Parser::yytname_
static const char *const yytname_[]
For a symbol, its name in clear.
Definition: aprepro_parser.h:449
SEAMS::Parser::yysyntax_error_
virtual std::string yysyntax_error_(state_type yystate, const symbol_type &yyla) const
Definition: apr_parser.cc:2074
SEAMS::Parser::token_type
token::yytokentype token_type
(External) token type, as returned by yylex.
Definition: aprepro_parser.h:243
SEAMS::Parser::stack::operator[]
T & operator[](size_type i)
Definition: aprepro_parser.h:542
SEAMS::Parser::stack::const_iterator
S::const_reverse_iterator const_iterator
Definition: aprepro_parser.h:534
SEAMS::Parser::operator()
int operator()()
Definition: apr_parser.cc:396
SEAMS::Parser::stack::push
void push(YY_MOVE_REF(T) t)
Definition: aprepro_parser.h:562
SEAMS::Parser::debug_stream
std::ostream & debug_stream() const YY_ATTRIBUTE_PURE
The current debugging stream.
Definition: apr_parser.cc:374
SEAMS::Parser::stack::slice::slice
slice(const stack &stack, int range)
Definition: aprepro_parser.h:591
SEAMS::Parser::semantic_type::val
double val
Definition: aprepro_parser.h:167
SEAMS::Parser::syntax_error::syntax_error
syntax_error(const syntax_error &s)
Definition: aprepro_parser.h:183
SEAMS::Parser::yyeof_
Definition: aprepro_parser.h:633
SEAMS::symrec
Definition: aprepro.h:74
SEAMS::Parser::by_state::kind_type
state_type kind_type
The symbol type as needed by the constructor.
Definition: aprepro_parser.h:484
SEAMS::Parser::yypush_
void yypush_(const char *m, YY_MOVE_REF(stack_symbol_type) sym)
Definition: apr_parser.cc:354
SEAMS::Parser::yyr1_
static const unsigned char yyr1_[]
Definition: aprepro_parser.h:440
YY_ATTRIBUTE_PURE
#define YY_ATTRIBUTE_PURE
Definition: aprepro_parser.h:99
SEAMS::Parser::yypact_
static const short yypact_[]
Definition: aprepro_parser.h:415
SEAMS::Parser::stack::operator[]
T & operator[](int i)
Definition: aprepro_parser.h:547
SEAMS::Parser::yytable_ninf_
static const signed char yytable_ninf_
Definition: aprepro_parser.h:407
SEAMS::Parser::Parser
Parser(class Aprepro &aprepro_yyarg)
Build a parser object.
Definition: apr_parser.cc:197
SEAMS::Parser::yycheck_
static const short yycheck_[]
Definition: aprepro_parser.h:433
SEAMS::Parser::symbol_type
"External" symbols: returned by the scanner.
Definition: aprepro_parser.h:343
SEAMS::Parser::yylast_
Last index in yytable_.
Definition: aprepro_parser.h:634
SEAMS::Parser::yydebug_
int yydebug_
Debugging level.
Definition: aprepro_parser.h:459
SEAMS::Parser::aprepro
class Aprepro & aprepro
Definition: aprepro_parser.h:643
SEAMS::Parser::stack::seq_
S seq_
The wrapped container.
Definition: aprepro_parser.h:604
SEAMS::Parser::stack::operator[]
const T & operator[](int i) const
Definition: aprepro_parser.h:557
SEAMS::Parser::yytnamerr_
static std::string yytnamerr_(const char *n)
Convert the symbol name n to a form suitable for a diagnostic.
Definition: apr_parser.cc:168
YY_NOEXCEPT
#define YY_NOEXCEPT
Definition: aprepro_parser.h:78
YY_RVREF
#define YY_RVREF(Type)
Definition: aprepro_parser.h:69
SEAMS::Parser::yy_lr_goto_state_
state_type yy_lr_goto_state_(state_type yystate, int yysym)
Definition: apr_parser.cc:383
SEAMS::Parser::yyfinal_
Termination state number.
Definition: aprepro_parser.h:636
SEAMS::Parser::stack::end
const_iterator end() const YY_NOEXCEPT
Bottom of the stack.
Definition: aprepro_parser.h:585
SEAMS::Parser::stack::size
size_type size() const YY_NOEXCEPT
Number of elements on the stack.
Definition: aprepro_parser.h:579
SEAMS::Parser::stack::pop
void pop(int n=1) YY_NOEXCEPT
Pop elements from the stack.
Definition: aprepro_parser.h:569
SEAMS::Parser::semantic_type::tptr
struct symrec * tptr
Definition: aprepro_parser.h:168
YY_NOTHROW
#define YY_NOTHROW
Definition: aprepro_parser.h:79
SEAMS::Parser::stack::begin
const_iterator begin() const YY_NOEXCEPT
Iterator on top of the stack (going downwards).
Definition: aprepro_parser.h:582
SEAMS::Parser::yyntokens_
Number of tokens.
Definition: aprepro_parser.h:639
SEAMS::Parser::stack_symbol_type::super_type
basic_symbol< by_state > super_type
Superclass.
Definition: aprepro_parser.h:514
SEAMS::Parser::token
Tokens.
Definition: aprepro_parser.h:189
SEAMS::Parser::stack::iterator
S::reverse_iterator iterator
Definition: aprepro_parser.h:533
SEAMS::Parser::debug_level_type
int debug_level_type
Type for debugging levels.
Definition: aprepro_parser.h:366
SEAMS::Parser::empty_symbol
Definition: aprepro_parser.h:249
SEAMS::Parser::yypop_
void yypop_(int n=1)
Pop n symbols from the stack.
Definition: apr_parser.cc:371
SEAMS::Parser::yy_table_value_is_error_
static bool yy_table_value_is_error_(int yyvalue)
Definition: apr_parser.cc:394
SEAMS::Parser::stack::slice
Present a slice of the top of a stack.
Definition: aprepro_parser.h:588
SEAMS::Parser::parse
virtual int parse()
Definition: apr_parser.cc:398
SEAMS::Parser::by_type::kind_type
token_type kind_type
The symbol type as needed by the constructor.
Definition: aprepro_parser.h:318
SEAMS::Parser::stack_type
stack< stack_symbol_type > stack_type
Stack type.
Definition: aprepro_parser.h:608
SEAMS::Parser::yystos_
static const unsigned char yystos_[]
Definition: aprepro_parser.h:437
SEAMS::Parser::token_number_type
unsigned char token_number_type
Internal symbol number for tokens (subsumed by symbol_number_type).
Definition: aprepro_parser.h:252
SEAMS::Parser::operator=
Parser & operator=(const Parser &)
SEAMS::Parser::semantic_type::arrval
struct array * arrval
Definition: aprepro_parser.h:170
SEAMS::Parser::stack::clear
void clear() YY_NOEXCEPT
Pop all elements from the stack.
Definition: aprepro_parser.h:576
SEAMS::Parser::set_debug_level
void set_debug_level(debug_level_type l)
Set the current debugging level.
Definition: apr_parser.cc:380
SEAMS::Parser::basic_symbol::super_type
Base super_type
Alias to Base.
Definition: aprepro_parser.h:263
SEAMS::Parser::yyr2_
static const unsigned char yyr2_[]
Definition: aprepro_parser.h:443
SEAMS::Parser::yytable_
static const unsigned short yytable_[]
Definition: aprepro_parser.h:431
SEAMS::Parser::basic_symbol
Definition: aprepro_parser.h:260
SEAMS::Parser::stack::operator[]
const T & operator[](size_type i) const
Definition: aprepro_parser.h:552
SEAMS::Parser::debug_level
debug_level_type debug_level() const YY_ATTRIBUTE_PURE
The current debugging level.
Definition: apr_parser.cc:378
SEAMS::Parser::yystack_print_
virtual void yystack_print_()
Print the state stack on the debug stream.
Definition: apr_parser.cc:2454
SEAMS::Parser::semantic_type::string
char * string
Definition: aprepro_parser.h:169
SEAMS::Parser::state_type
int state_type
State numbers.
Definition: aprepro_parser.h:386
SEAMS::Parser::yypgoto_
static const signed char yypgoto_[]
Definition: aprepro_parser.h:423
SEAMS::Parser::yyerrcode_
Definition: aprepro_parser.h:638
SEAMS::Parser::stack_symbol_type
"Internal" symbol: element of the stack.
Definition: aprepro_parser.h:511
SEAMS::Parser::stack
A stack with random access from its top.
Definition: aprepro_parser.h:529
SEAMS::Parser::~Parser
virtual ~Parser()
Definition: apr_parser.cc:206
SEAMS::Parser::syntax_error::~syntax_error
~syntax_error() YY_NOEXCEPT YY_NOTHROW
Definition: apr_parser.cc:208
SEAMS::Aprepro
Definition: aprepro.h:183
SEAMS::Parser::yydefgoto_
static const short yydefgoto_[]
Definition: aprepro_parser.h:426
SEAMS::Parser::stack::size_type
S::size_type size_type
Definition: aprepro_parser.h:535
SEAMS::Parser::yy_print_
void yy_print_(std::ostream &yyo, const basic_symbol< Base > &yysym) const
Display a symbol type, value and location.
Definition: apr_parser.cc:336
SEAMS::Parser::symbol_number_type
int symbol_number_type
Symbol type: an internal symbol number.
Definition: aprepro_parser.h:246
SEAMS::Parser::stack::stack
stack(size_type n=200)
Definition: aprepro_parser.h:537
SEAMS::Parser::yyrline_
static const unsigned short yyrline_[]
Definition: aprepro_parser.h:452
SEAMS::Parser::yytranslate_
static token_number_type yytranslate_(int t)
Convert a scanner token number t to a symbol number.
Definition: apr_parser.cc:2475
SEAMS::Parser::yystack_
stack_type yystack_
The stack.
Definition: aprepro_parser.h:611
SEAMS::Parser
A Bison parser.
Definition: aprepro_parser.h:159
SEAMS::Parser::basic_symbol::basic_symbol
basic_symbol()
Default constructor.
Definition: aprepro_parser.h:266
SEAMS::Parser::yy_destroy_
void yy_destroy_(const char *yymsg, basic_symbol< Base > &yysym) const
Reclaim the memory associated to a symbol.
Definition: apr_parser.cc:325