Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 09:29:19

0001 // Copyright (c) 2025 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 // A Bison parser, made by GNU Bison 3.7.4.
0015 
0016 // Skeleton interface for Bison LALR(1) parsers in C++
0017 
0018 // Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
0019 
0020 // This program is free software: you can redistribute it and/or modify
0021 // it under the terms of the GNU General Public License as published by
0022 // the Free Software Foundation, either version 3 of the License, or
0023 // (at your option) any later version.
0024 
0025 // This program is distributed in the hope that it will be useful,
0026 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0027 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0028 // GNU General Public License for more details.
0029 
0030 // You should have received a copy of the GNU General Public License
0031 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
0032 
0033 // As a special exception, you may create a larger work that contains
0034 // part or all of the Bison parser skeleton and distribute that work
0035 // under terms of your choice, so long as that work isn't itself a
0036 // parser generator using the skeleton or a modified version thereof
0037 // as a parser skeleton.  Alternatively, if you modify or redistribute
0038 // the parser skeleton itself, you may (at your option) remove this
0039 // special exception, which will cause the skeleton and the resulting
0040 // Bison output files to be licensed under the GNU General Public
0041 // License without this special exception.
0042 
0043 // This special exception was added by the Free Software Foundation in
0044 // version 2.2 of Bison.
0045 
0046 // NOLINTBEGIN - Bison-generated file, do not modify with clang-tidy
0047 
0048 /**
0049  ** \file StepFile/step.tab.hxx
0050  ** Define the step::parser class.
0051  */
0052 
0053 // C++ LALR(1) parser skeleton written by Akim Demaille.
0054 
0055 // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
0056 // especially those whose name start with YY_ or yy_.  They are
0057 // private implementation details that can be changed or removed.
0058 
0059 #ifndef YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0060 #define YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0061 // "%code requires" blocks.
0062 
0063 // This file is part of Open CASCADE Technology software library.
0064 // This file is generated, do not modify it directly; edit source file step.yacc instead.
0065 
0066 #include <StepFile_ReadData.hxx>
0067 
0068 namespace step
0069 {
0070 class scanner;
0071 };
0072 
0073 #ifdef _MSC_VER
0074   // disable MSVC warning C4522: 'step::parser::stack_symbol_type': multiple assignment operators
0075   #pragma warning(disable : 4522)
0076   // disable MSVC warning C4512: 'step::parser::stack::slice' : assignment operator could not be
0077   // generated
0078   #pragma warning(disable : 4512)
0079 #endif
0080 
0081 #include <cstdlib> // std::abort
0082 #include <iostream>
0083 #include <stdexcept>
0084 #include <string>
0085 #include <vector>
0086 
0087 #if defined __cplusplus
0088   #define YY_CPLUSPLUS __cplusplus
0089 #else
0090   #define YY_CPLUSPLUS 199711L
0091 #endif
0092 
0093 // Support move semantics when possible.
0094 #if 201103L <= YY_CPLUSPLUS
0095   #define YY_MOVE std::move
0096   #define YY_MOVE_OR_COPY move
0097   #define YY_MOVE_REF(Type) Type&&
0098   #define YY_RVREF(Type) Type&&
0099   #define YY_COPY(Type) Type
0100 #else
0101   #define YY_MOVE
0102   #define YY_MOVE_OR_COPY copy
0103   #define YY_MOVE_REF(Type) Type&
0104   #define YY_RVREF(Type) const Type&
0105   #define YY_COPY(Type) const Type&
0106 #endif
0107 
0108 // Support noexcept when possible.
0109 #if 201103L <= YY_CPLUSPLUS
0110   #define YY_NOEXCEPT noexcept
0111   #define YY_NOTHROW
0112 #else
0113   #define YY_NOEXCEPT
0114   #define YY_NOTHROW throw()
0115 #endif
0116 
0117 // Support constexpr when possible.
0118 #if 201703 <= YY_CPLUSPLUS
0119   #define YY_CONSTEXPR constexpr
0120 #else
0121   #define YY_CONSTEXPR
0122 #endif
0123 
0124 #ifndef YY_ATTRIBUTE_PURE
0125   #if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
0126     #define YY_ATTRIBUTE_PURE __attribute__((__pure__))
0127   #else
0128     #define YY_ATTRIBUTE_PURE
0129   #endif
0130 #endif
0131 
0132 #ifndef YY_ATTRIBUTE_UNUSED
0133   #if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
0134     #define YY_ATTRIBUTE_UNUSED __attribute__((__unused__))
0135   #else
0136     #define YY_ATTRIBUTE_UNUSED
0137   #endif
0138 #endif
0139 
0140 /* Suppress unused-variable warnings by "using" E.  */
0141 #if !defined lint || defined __GNUC__
0142   #define YYUSE(E) ((void)(E))
0143 #else
0144   #define YYUSE(E) /* empty */
0145 #endif
0146 
0147 #if defined __GNUC__ && !defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
0148   /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
0149   #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                                                      \
0150     _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"")           \
0151       _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
0152   #define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")
0153 #else
0154   #define YY_INITIAL_VALUE(Value) Value
0155 #endif
0156 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0157   #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0158   #define YY_IGNORE_MAYBE_UNINITIALIZED_END
0159 #endif
0160 #ifndef YY_INITIAL_VALUE
0161   #define YY_INITIAL_VALUE(Value) /* Nothing. */
0162 #endif
0163 
0164 #if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__
0165   #define YY_IGNORE_USELESS_CAST_BEGIN                                                             \
0166     _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"")
0167   #define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop")
0168 #endif
0169 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
0170   #define YY_IGNORE_USELESS_CAST_BEGIN
0171   #define YY_IGNORE_USELESS_CAST_END
0172 #endif
0173 
0174 #ifndef YY_CAST
0175   #ifdef __cplusplus
0176     #define YY_CAST(Type, Val) static_cast<Type>(Val)
0177     #define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val)
0178   #else
0179     #define YY_CAST(Type, Val) ((Type)(Val))
0180     #define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val))
0181   #endif
0182 #endif
0183 #ifndef YY_NULLPTR
0184   #if defined __cplusplus
0185     #if 201103L <= __cplusplus
0186       #define YY_NULLPTR nullptr
0187     #else
0188       #define YY_NULLPTR 0
0189     #endif
0190   #else
0191     #define YY_NULLPTR ((void*)0)
0192   #endif
0193 #endif
0194 
0195 /* Debug traces.  */
0196 #ifndef YYDEBUG
0197   #define YYDEBUG 0
0198 #endif
0199 
0200 namespace step
0201 {
0202 
0203 /// A Bison parser.
0204 class parser
0205 {
0206 public:
0207 #ifndef YYSTYPE
0208   /// Symbol semantic values.
0209   typedef int semantic_type;
0210 #else
0211   typedef YYSTYPE semantic_type;
0212 #endif
0213 
0214   /// Syntax errors thrown from user actions.
0215   struct syntax_error : std::runtime_error
0216   {
0217     syntax_error(const std::string& m)
0218         : std::runtime_error(m)
0219     {
0220     }
0221 
0222     syntax_error(const syntax_error& s)
0223         : std::runtime_error(s.what())
0224     {
0225     }
0226 
0227     ~syntax_error() YY_NOEXCEPT YY_NOTHROW;
0228   };
0229 
0230   /// Token kinds.
0231   struct token
0232   {
0233     enum token_kind_type
0234     {
0235       YYEMPTY  = -2,
0236       YYEOF    = 0,   // "end of file"
0237       YYerror  = 256, // error
0238       YYUNDEF  = 257, // "invalid token"
0239       STEP     = 258, // STEP
0240       HEADER   = 259, // HEADER
0241       ENDSEC   = 260, // ENDSEC
0242       DATA     = 261, // DATA
0243       ENDSTEP  = 262, // ENDSTEP
0244       SCOPE    = 263, // SCOPE
0245       ENDSCOPE = 264, // ENDSCOPE
0246       ENTITY   = 265, // ENTITY
0247       TYPE     = 266, // TYPE
0248       INTEGER  = 267, // INTEGER
0249       FLOAT    = 268, // FLOAT
0250       IDENT    = 269, // IDENT
0251       TEXT     = 270, // TEXT
0252       NONDEF   = 271, // NONDEF
0253       ENUM     = 272, // ENUM
0254       HEXA     = 273, // HEXA
0255       QUID     = 274  // QUID
0256     };
0257 
0258     /// Backward compatibility alias (Bison 3.6).
0259     typedef token_kind_type yytokentype;
0260   };
0261 
0262   /// Token kind, as returned by yylex.
0263   typedef token::yytokentype token_kind_type;
0264 
0265   /// Backward compatibility alias (Bison 3.6).
0266   typedef token_kind_type token_type;
0267 
0268   /// Symbol kinds.
0269   struct symbol_kind
0270   {
0271     enum symbol_kind_type
0272     {
0273       YYNTOKENS  = 27, ///< Number of tokens.
0274       S_YYEMPTY  = -2,
0275       S_YYEOF    = 0,  // "end of file"
0276       S_YYerror  = 1,  // error
0277       S_YYUNDEF  = 2,  // "invalid token"
0278       S_STEP     = 3,  // STEP
0279       S_HEADER   = 4,  // HEADER
0280       S_ENDSEC   = 5,  // ENDSEC
0281       S_DATA     = 6,  // DATA
0282       S_ENDSTEP  = 7,  // ENDSTEP
0283       S_SCOPE    = 8,  // SCOPE
0284       S_ENDSCOPE = 9,  // ENDSCOPE
0285       S_ENTITY   = 10, // ENTITY
0286       S_TYPE     = 11, // TYPE
0287       S_INTEGER  = 12, // INTEGER
0288       S_FLOAT    = 13, // FLOAT
0289       S_IDENT    = 14, // IDENT
0290       S_TEXT     = 15, // TEXT
0291       S_NONDEF   = 16, // NONDEF
0292       S_ENUM     = 17, // ENUM
0293       S_HEXA     = 18, // HEXA
0294       S_QUID     = 19, // QUID
0295       S_20_      = 20, // ' '
0296       S_21_      = 21, // ';'
0297       S_22_      = 22, // '('
0298       S_23_      = 23, // ')'
0299       S_24_      = 24, // ','
0300       S_25_      = 25, // '='
0301       S_26_      = 26, // '/'
0302       S_YYACCEPT = 27, // $accept
0303       S_finvide  = 28, // finvide
0304       S_finstep  = 29, // finstep
0305       S_stepf1   = 30, // stepf1
0306       S_stepf2   = 31, // stepf2
0307       S_stepf3   = 32, // stepf3
0308       S_stepf    = 33, // stepf
0309       S_headl    = 34, // headl
0310       S_headent  = 35, // headent
0311       S_endhead  = 36, // endhead
0312       S_unarg    = 37, // unarg
0313       S_listype  = 38, // listype
0314       S_deblist  = 39, // deblist
0315       S_finlist  = 40, // finlist
0316       S_listarg  = 41, // listarg
0317       S_arglist  = 42, // arglist
0318       S_model    = 43, // model
0319       S_bloc     = 44, // bloc
0320       S_plex     = 45, // plex
0321       S_unent    = 46, // unent
0322       S_debscop  = 47, // debscop
0323       S_unid     = 48, // unid
0324       S_export   = 49, // export
0325       S_debexp   = 50, // debexp
0326       S_finscop  = 51, // finscop
0327       S_entlab   = 52, // entlab
0328       S_enttype  = 53  // enttype
0329     };
0330   };
0331 
0332   /// (Internal) symbol kind.
0333   typedef symbol_kind::symbol_kind_type symbol_kind_type;
0334 
0335   /// The number of tokens.
0336   static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
0337 
0338   /// A complete symbol.
0339   ///
0340   /// Expects its Base type to provide access to the symbol kind
0341   /// via kind ().
0342   ///
0343   /// Provide access to semantic value.
0344   template <typename Base>
0345   struct basic_symbol : Base
0346   {
0347     /// Alias to Base.
0348     typedef Base super_type;
0349 
0350     /// Default constructor.
0351     basic_symbol()
0352         : value()
0353     {
0354     }
0355 
0356 #if 201103L <= YY_CPLUSPLUS
0357     /// Move constructor.
0358     basic_symbol(basic_symbol&& that)
0359         : Base(std::move(that)),
0360           value(std::move(that.value))
0361     {
0362     }
0363 #endif
0364 
0365     /// Copy constructor.
0366     basic_symbol(const basic_symbol& that);
0367     /// Constructor for valueless symbols.
0368     basic_symbol(typename Base::kind_type t);
0369 
0370     /// Constructor for symbols with semantic value.
0371     basic_symbol(typename Base::kind_type t, YY_RVREF(semantic_type) v);
0372 
0373     /// Destroy the symbol.
0374     ~basic_symbol() { clear(); }
0375 
0376     /// Destroy contents, and record that is empty.
0377     void clear() { Base::clear(); }
0378 
0379     /// The user-facing name of this symbol.
0380     std::string name() const YY_NOEXCEPT { return parser::symbol_name(this->kind()); }
0381 
0382     /// Backward compatibility (Bison 3.6).
0383     symbol_kind_type type_get() const YY_NOEXCEPT;
0384 
0385     /// Whether empty.
0386     bool empty() const YY_NOEXCEPT;
0387 
0388     /// Destructive move, \a s is emptied into this.
0389     void move(basic_symbol& s);
0390 
0391     /// The semantic value.
0392     semantic_type value;
0393 
0394   private:
0395 #if YY_CPLUSPLUS < 201103L
0396     /// Assignment operator.
0397     basic_symbol& operator=(const basic_symbol& that);
0398 #endif
0399   };
0400 
0401   /// Type access provider for token (enum) based symbols.
0402   struct by_kind
0403   {
0404     /// Default constructor.
0405     by_kind();
0406 
0407 #if 201103L <= YY_CPLUSPLUS
0408     /// Move constructor.
0409     by_kind(by_kind&& that);
0410 #endif
0411 
0412     /// Copy constructor.
0413     by_kind(const by_kind& that);
0414 
0415     /// The symbol kind as needed by the constructor.
0416     typedef token_kind_type kind_type;
0417 
0418     /// Constructor from (external) token numbers.
0419     by_kind(kind_type t);
0420 
0421     /// Record that this symbol is empty.
0422     void clear();
0423 
0424     /// Steal the symbol kind from \a that.
0425     void move(by_kind& that);
0426 
0427     /// The (internal) type number (corresponding to \a type).
0428     /// \a empty when empty.
0429     symbol_kind_type kind() const YY_NOEXCEPT;
0430 
0431     /// Backward compatibility (Bison 3.6).
0432     symbol_kind_type type_get() const YY_NOEXCEPT;
0433 
0434     /// The symbol kind.
0435     /// \a S_YYEMPTY when empty.
0436     symbol_kind_type kind_;
0437   };
0438 
0439   /// Backward compatibility for a private implementation detail (Bison 3.6).
0440   typedef by_kind by_type;
0441 
0442   /// "External" symbols: returned by the scanner.
0443   struct symbol_type : basic_symbol<by_kind>
0444   {
0445   };
0446 
0447   /// Build a parser object.
0448   parser(step::scanner* scanner_yyarg);
0449   virtual ~parser();
0450 
0451 #if 201103L <= YY_CPLUSPLUS
0452   /// Non copyable.
0453   parser(const parser&) = delete;
0454   /// Non copyable.
0455   parser& operator=(const parser&) = delete;
0456 #endif
0457 
0458   /// Parse.  An alias for parse ().
0459   /// \returns  0 iff parsing succeeded.
0460   int operator()();
0461 
0462   /// Parse.
0463   /// \returns  0 iff parsing succeeded.
0464   virtual int parse();
0465 
0466 #if YYDEBUG
0467   /// The current debugging stream.
0468   std::ostream& debug_stream() const YY_ATTRIBUTE_PURE;
0469   /// Set the current debugging stream.
0470   void set_debug_stream(std::ostream&);
0471 
0472   /// Type for debugging levels.
0473   typedef int debug_level_type;
0474   /// The current debugging level.
0475   debug_level_type debug_level() const YY_ATTRIBUTE_PURE;
0476   /// Set the current debugging level.
0477   void set_debug_level(debug_level_type l);
0478 #endif
0479 
0480   /// Report a syntax error.
0481   /// \param msg    a description of the syntax error.
0482   virtual void error(const std::string& msg);
0483 
0484   /// Report a syntax error.
0485   void error(const syntax_error& err);
0486 
0487   /// The user-facing name of the symbol whose (internal) number is
0488   /// YYSYMBOL.  No bounds checking.
0489   static std::string symbol_name(symbol_kind_type yysymbol);
0490 
0491   class context
0492   {
0493   public:
0494     context(const parser& yyparser, const symbol_type& yyla);
0495 
0496     const symbol_type& lookahead() const { return yyla_; }
0497 
0498     symbol_kind_type token() const { return yyla_.kind(); }
0499 
0500     /// Put in YYARG at most YYARGN of the expected tokens, and return the
0501     /// number of tokens stored in YYARG.  If YYARG is null, return the
0502     /// number of expected tokens (guaranteed to be less than YYNTOKENS).
0503     int expected_tokens(symbol_kind_type yyarg[], int yyargn) const;
0504 
0505   private:
0506     const parser&      yyparser_;
0507     const symbol_type& yyla_;
0508   };
0509 
0510 private:
0511 #if YY_CPLUSPLUS < 201103L
0512   /// Non copyable.
0513   parser(const parser&);
0514   /// Non copyable.
0515   parser& operator=(const parser&);
0516 #endif
0517 
0518   /// Stored state numbers (used for stacks).
0519   typedef signed char state_type;
0520 
0521   /// The arguments of the error message.
0522   int yy_syntax_error_arguments_(const context& yyctx, symbol_kind_type yyarg[], int yyargn) const;
0523 
0524   /// Generate an error message.
0525   /// \param yyctx     the context in which the error occurred.
0526   virtual std::string yysyntax_error_(const context& yyctx) const;
0527   /// Compute post-reduction state.
0528   /// \param yystate   the current state
0529   /// \param yysym     the nonterminal to push on the stack
0530   static state_type yy_lr_goto_state_(state_type yystate, int yysym);
0531 
0532   /// Whether the given \c yypact_ value indicates a defaulted state.
0533   /// \param yyvalue   the value to check
0534   static bool yy_pact_value_is_default_(int yyvalue);
0535 
0536   /// Whether the given \c yytable_ value indicates a syntax error.
0537   /// \param yyvalue   the value to check
0538   static bool yy_table_value_is_error_(int yyvalue);
0539 
0540   static const signed char yypact_ninf_;
0541   static const signed char yytable_ninf_;
0542 
0543   /// Convert a scanner token kind \a t to a symbol kind.
0544   /// In theory \a t should be a token_kind_type, but character literals
0545   /// are valid, yet not members of the token_type enum.
0546   static symbol_kind_type yytranslate_(int t);
0547 
0548   /// Convert the symbol name \a n to a form suitable for a diagnostic.
0549   static std::string yytnamerr_(const char* yystr);
0550 
0551   /// For a symbol, its name in clear.
0552   static const char* const yytname_[];
0553 
0554   // Tables.
0555   // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
0556   // STATE-NUM.
0557   static const signed char yypact_[];
0558 
0559   // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
0560   // Performed when YYTABLE does not specify something else to do.  Zero
0561   // means the default is an error.
0562   static const signed char yydefact_[];
0563 
0564   // YYPGOTO[NTERM-NUM].
0565   static const signed char yypgoto_[];
0566 
0567   // YYDEFGOTO[NTERM-NUM].
0568   static const signed char yydefgoto_[];
0569 
0570   // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
0571   // positive, shift that token.  If negative, reduce the rule whose
0572   // number is the opposite.  If YYTABLE_NINF, syntax error.
0573   static const signed char yytable_[];
0574 
0575   static const signed char yycheck_[];
0576 
0577   // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
0578   // symbol of state STATE-NUM.
0579   static const signed char yystos_[];
0580 
0581   // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
0582   static const signed char yyr1_[];
0583 
0584   // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
0585   static const signed char yyr2_[];
0586 
0587 #if YYDEBUG
0588   // YYRLINE[YYN] -- Source line where rule number YYN was defined.
0589   static const unsigned char yyrline_[];
0590   /// Report on the debug stream that the rule \a r is going to be reduced.
0591   virtual void yy_reduce_print_(int r) const;
0592   /// Print the state stack on the debug stream.
0593   virtual void yy_stack_print_() const;
0594 
0595   /// Debugging level.
0596   int yydebug_;
0597   /// Debug stream.
0598   std::ostream* yycdebug_;
0599 
0600   /// \brief Display a symbol kind, value and location.
0601   /// \param yyo    The output stream.
0602   /// \param yysym  The symbol.
0603   template <typename Base>
0604   void yy_print_(std::ostream& yyo, const basic_symbol<Base>& yysym) const;
0605 #endif
0606 
0607   /// \brief Reclaim the memory associated to a symbol.
0608   /// \param yymsg     Why this token is reclaimed.
0609   ///                  If null, print nothing.
0610   /// \param yysym     The symbol.
0611   template <typename Base>
0612   void yy_destroy_(const char* yymsg, basic_symbol<Base>& yysym) const;
0613 
0614 private:
0615   /// Type access provider for state based symbols.
0616   struct by_state
0617   {
0618     /// Default constructor.
0619     by_state() YY_NOEXCEPT;
0620 
0621     /// The symbol kind as needed by the constructor.
0622     typedef state_type kind_type;
0623 
0624     /// Constructor.
0625     by_state(kind_type s) YY_NOEXCEPT;
0626 
0627     /// Copy constructor.
0628     by_state(const by_state& that) YY_NOEXCEPT;
0629 
0630     /// Record that this symbol is empty.
0631     void clear() YY_NOEXCEPT;
0632 
0633     /// Steal the symbol kind from \a that.
0634     void move(by_state& that);
0635 
0636     /// The symbol kind (corresponding to \a state).
0637     /// \a symbol_kind::S_YYEMPTY when empty.
0638     symbol_kind_type kind() const YY_NOEXCEPT;
0639 
0640     /// The state number used to denote an empty symbol.
0641     /// We use the initial state, as it does not have a value.
0642     enum
0643     {
0644       empty_state = 0
0645     };
0646 
0647     /// The state.
0648     /// \a empty when empty.
0649     state_type state;
0650   };
0651 
0652   /// "Internal" symbol: element of the stack.
0653   struct stack_symbol_type : basic_symbol<by_state>
0654   {
0655     /// Superclass.
0656     typedef basic_symbol<by_state> super_type;
0657     /// Construct an empty symbol.
0658     stack_symbol_type();
0659     /// Move or copy construction.
0660     stack_symbol_type(YY_RVREF(stack_symbol_type) that);
0661     /// Steal the contents from \a sym to build this.
0662     stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) sym);
0663 #if YY_CPLUSPLUS < 201103L
0664     /// Assignment, needed by push_back by some old implementations.
0665     /// Moves the contents of that.
0666     stack_symbol_type& operator=(stack_symbol_type& that);
0667 
0668     /// Assignment, needed by push_back by other implementations.
0669     /// Needed by some other old implementations.
0670     stack_symbol_type& operator=(const stack_symbol_type& that);
0671 #endif
0672   };
0673 
0674   /// A stack with random access from its top.
0675   template <typename T, typename S = std::vector<T>>
0676   class stack
0677   {
0678   public:
0679     // Hide our reversed order.
0680     typedef typename S::iterator       iterator;
0681     typedef typename S::const_iterator const_iterator;
0682     typedef typename S::size_type      size_type;
0683     typedef typename std::ptrdiff_t    index_type;
0684 
0685     stack(size_type n = 200)
0686         : seq_(n)
0687     {
0688     }
0689 
0690 #if 201103L <= YY_CPLUSPLUS
0691     /// Non copyable.
0692     stack(const stack&) = delete;
0693     /// Non copyable.
0694     stack& operator=(const stack&) = delete;
0695 #endif
0696 
0697     /// Random access.
0698     ///
0699     /// Index 0 returns the topmost element.
0700     const T& operator[](index_type i) const { return seq_[size_type(size() - 1 - i)]; }
0701 
0702     /// Random access.
0703     ///
0704     /// Index 0 returns the topmost element.
0705     T& operator[](index_type i) { return seq_[size_type(size() - 1 - i)]; }
0706 
0707     /// Steal the contents of \a t.
0708     ///
0709     /// Close to move-semantics.
0710     void push(YY_MOVE_REF(T) t)
0711     {
0712       seq_.push_back(T());
0713       operator[](0).move(t);
0714     }
0715 
0716     /// Pop elements from the stack.
0717     void pop(std::ptrdiff_t n = 1) YY_NOEXCEPT
0718     {
0719       for (; 0 < n; --n)
0720         seq_.pop_back();
0721     }
0722 
0723     /// Pop all elements from the stack.
0724     void clear() YY_NOEXCEPT { seq_.clear(); }
0725 
0726     /// Number of elements on the stack.
0727     index_type size() const YY_NOEXCEPT { return index_type(seq_.size()); }
0728 
0729     /// Iterator on top of the stack (going downwards).
0730     const_iterator begin() const YY_NOEXCEPT { return seq_.begin(); }
0731 
0732     /// Bottom of the stack.
0733     const_iterator end() const YY_NOEXCEPT { return seq_.end(); }
0734 
0735     /// Present a slice of the top of a stack.
0736     class slice
0737     {
0738     public:
0739       slice(const stack& stack, index_type range)
0740           : stack_(stack),
0741             range_(range)
0742       {
0743       }
0744 
0745       const T& operator[](index_type i) const { return stack_[range_ - i]; }
0746 
0747     private:
0748       const stack& stack_;
0749       index_type   range_;
0750     };
0751 
0752   private:
0753 #if YY_CPLUSPLUS < 201103L
0754     /// Non copyable.
0755     stack(const stack&);
0756     /// Non copyable.
0757     stack& operator=(const stack&);
0758 #endif
0759     /// The wrapped container.
0760     S seq_;
0761   };
0762 
0763   /// Stack type.
0764   typedef stack<stack_symbol_type> stack_type;
0765 
0766   /// The stack.
0767   stack_type yystack_;
0768 
0769   /// Push a new state on the stack.
0770   /// \param m    a debug message to display
0771   ///             if null, no trace is output.
0772   /// \param sym  the symbol
0773   /// \warning the contents of \a s.value is stolen.
0774   void yypush_(const char* m, YY_MOVE_REF(stack_symbol_type) sym);
0775 
0776   /// Push a new look ahead token on the state on the stack.
0777   /// \param m    a debug message to display
0778   ///             if null, no trace is output.
0779   /// \param s    the state
0780   /// \param sym  the symbol (for its value and location).
0781   /// \warning the contents of \a sym.value is stolen.
0782   void yypush_(const char* m, state_type s, YY_MOVE_REF(symbol_type) sym);
0783 
0784   /// Pop \a n symbols from the stack.
0785   void yypop_(int n = 1);
0786 
0787   /// Constants.
0788   enum
0789   {
0790     yylast_  = 82, ///< Last index in yytable_.
0791     yynnts_  = 27, ///< Number of nonterminal symbols.
0792     yyfinal_ = 7   ///< Termination state number.
0793   };
0794 
0795   // User arguments.
0796   step::scanner* scanner;
0797 };
0798 
0799 } // namespace step
0800 
0801 // "%code provides" blocks.
0802 
0803 // Define stepFlexLexer class by inclusion of FlexLexer.h,
0804 // but only if this has not been done yet, to avoid redefinition
0805 #if !defined(yyFlexLexer) && !defined(FlexLexerOnce)
0806   #define yyFlexLexer stepFlexLexer
0807   #include <FlexLexer.h>
0808 #endif
0809 
0810 namespace step
0811 {
0812 
0813 // To feed data back to bison, the yylex method needs yylval and
0814 // yylloc parameters. Since the stepFlexLexer class is defined in the
0815 // system header <FlexLexer.h> the signature of its yylex() method
0816 // can not be changed anymore. This makes it necessary to derive a
0817 // scanner class that provides a method with the desired signature:
0818 
0819 class scanner : public stepFlexLexer
0820 {
0821 public:
0822   explicit scanner(StepFile_ReadData* theDataModel,
0823                    std::istream*      in  = nullptr,
0824                    std::ostream*      out = nullptr);
0825 
0826   int lex(step::parser::semantic_type* yylval);
0827 
0828   StepFile_ReadData* myDataModel;
0829 };
0830 
0831 }; // namespace step
0832 
0833 // NOLINTEND
0834 
0835 #endif // !YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED