Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/exptocas.tab.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // A Bison parser, made by GNU Bison 3.7.4.
0002 
0003 // Skeleton interface for Bison LALR(1) parsers in C++
0004 
0005 // Copyright (C) 2002-2015, 2018-2020 Free Software Foundation, Inc.
0006 
0007 // This program is free software: you can redistribute it and/or modify
0008 // it under the terms of the GNU General Public License as published by
0009 // the Free Software Foundation, either version 3 of the License, or
0010 // (at your option) any later version.
0011 
0012 // This program is distributed in the hope that it will be useful,
0013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0015 // GNU General Public License for more details.
0016 
0017 // You should have received a copy of the GNU General Public License
0018 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
0019 
0020 // As a special exception, you may create a larger work that contains
0021 // part or all of the Bison parser skeleton and distribute that work
0022 // under terms of your choice, so long as that work isn't itself a
0023 // parser generator using the skeleton or a modified version thereof
0024 // as a parser skeleton.  Alternatively, if you modify or redistribute
0025 // the parser skeleton itself, you may (at your option) remove this
0026 // special exception, which will cause the skeleton and the resulting
0027 // Bison output files to be licensed under the GNU General Public
0028 // License without this special exception.
0029 
0030 // This special exception was added by the Free Software Foundation in
0031 // version 2.2 of Bison.
0032 
0033 /**
0034  ** \file ExpToCasExe/exptocas.tab.hxx
0035  ** Define the exptocas::parser class.
0036  */
0037 
0038 // C++ LALR(1) parser skeleton written by Akim Demaille.
0039 
0040 // DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
0041 // especially those whose name start with YY_ or yy_.  They are
0042 // private implementation details that can be changed or removed.
0043 
0044 #ifndef YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED
0045 #define YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED
0046 // "%code requires" blocks.
0047 
0048 #include <OSD_OpenFile.hxx>
0049 #include <TCollection_HAsciiString.hxx>
0050 #include <TColStd_HSequenceOfHAsciiString.hxx>
0051 #include <Express_HSequenceOfField.hxx>
0052 #include <Express_HSequenceOfItem.hxx>
0053 #include <Express_Field.hxx>
0054 #include <Express_Item.hxx>
0055 #include <Express_Enum.hxx>
0056 #include <Express_Alias.hxx>
0057 #include <Express_Select.hxx>
0058 #include <Express_Entity.hxx>
0059 #include <Express_Type.hxx>
0060 #include <Express_NamedType.hxx>
0061 #include <Express_PredefinedType.hxx>
0062 #include <Express_Number.hxx>
0063 #include <Express_Integer.hxx>
0064 #include <Express_Boolean.hxx>
0065 #include <Express_Logical.hxx>
0066 #include <Express_Real.hxx>
0067 #include <Express_String.hxx>
0068 #include <Express_ComplexType.hxx>
0069 #include <Express_Array.hxx>
0070 #include <Express_List.hxx>
0071 #include <Express_Set.hxx>
0072 #include <Express_Bag.hxx>
0073 #include <Express_Schema.hxx>
0074 #include <Express_Reference.hxx>
0075 #include <Express.hxx>
0076 
0077 namespace exptocas
0078 {
0079 class scanner;
0080 };
0081 #ifdef _MSC_VER
0082   // disable MSVC warning C4522: 'exptocas::parser::stack_symbol_type': multiple assignment
0083   // operators
0084   #pragma warning(disable : 4522)
0085 #endif
0086 
0087 #include <cstdlib> // std::abort
0088 #include <iostream>
0089 #include <stdexcept>
0090 #include <string>
0091 #include <vector>
0092 
0093 #if defined __cplusplus
0094   #define YY_CPLUSPLUS __cplusplus
0095 #else
0096   #define YY_CPLUSPLUS 199711L
0097 #endif
0098 
0099 // Support move semantics when possible.
0100 #if 201103L <= YY_CPLUSPLUS
0101   #define YY_MOVE std::move
0102   #define YY_MOVE_OR_COPY move
0103   #define YY_MOVE_REF(Type) Type&&
0104   #define YY_RVREF(Type) Type&&
0105   #define YY_COPY(Type) Type
0106 #else
0107   #define YY_MOVE
0108   #define YY_MOVE_OR_COPY copy
0109   #define YY_MOVE_REF(Type) Type&
0110   #define YY_RVREF(Type) const Type&
0111   #define YY_COPY(Type) const Type&
0112 #endif
0113 
0114 // Support noexcept when possible.
0115 #if 201103L <= YY_CPLUSPLUS
0116   #define YY_NOEXCEPT noexcept
0117   #define YY_NOTHROW
0118 #else
0119   #define YY_NOEXCEPT
0120   #define YY_NOTHROW throw()
0121 #endif
0122 
0123 // Support constexpr when possible.
0124 #if 201703 <= YY_CPLUSPLUS
0125   #define YY_CONSTEXPR constexpr
0126 #else
0127   #define YY_CONSTEXPR
0128 #endif
0129 
0130 #ifndef YY_ATTRIBUTE_PURE
0131   #if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
0132     #define YY_ATTRIBUTE_PURE __attribute__((__pure__))
0133   #else
0134     #define YY_ATTRIBUTE_PURE
0135   #endif
0136 #endif
0137 
0138 #ifndef YY_ATTRIBUTE_UNUSED
0139   #if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
0140     #define YY_ATTRIBUTE_UNUSED __attribute__((__unused__))
0141   #else
0142     #define YY_ATTRIBUTE_UNUSED
0143   #endif
0144 #endif
0145 
0146 /* Suppress unused-variable warnings by "using" E.  */
0147 #if !defined lint || defined __GNUC__
0148   #define YYUSE(E) ((void)(E))
0149 #else
0150   #define YYUSE(E) /* empty */
0151 #endif
0152 
0153 #if defined __GNUC__ && !defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
0154   /* Suppress an incorrect diagnostic about yylval being uninitialized.  */
0155   #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN                                                      \
0156     _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuninitialized\"")           \
0157       _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
0158   #define YY_IGNORE_MAYBE_UNINITIALIZED_END _Pragma("GCC diagnostic pop")
0159 #else
0160   #define YY_INITIAL_VALUE(Value) Value
0161 #endif
0162 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0163   #define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0164   #define YY_IGNORE_MAYBE_UNINITIALIZED_END
0165 #endif
0166 #ifndef YY_INITIAL_VALUE
0167   #define YY_INITIAL_VALUE(Value) /* Nothing. */
0168 #endif
0169 
0170 #if defined __cplusplus && defined __GNUC__ && !defined __ICC && 6 <= __GNUC__
0171   #define YY_IGNORE_USELESS_CAST_BEGIN                                                             \
0172     _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wuseless-cast\"")
0173   #define YY_IGNORE_USELESS_CAST_END _Pragma("GCC diagnostic pop")
0174 #endif
0175 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
0176   #define YY_IGNORE_USELESS_CAST_BEGIN
0177   #define YY_IGNORE_USELESS_CAST_END
0178 #endif
0179 
0180 #ifndef YY_CAST
0181   #ifdef __cplusplus
0182     #define YY_CAST(Type, Val) static_cast<Type>(Val)
0183     #define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type>(Val)
0184   #else
0185     #define YY_CAST(Type, Val) ((Type)(Val))
0186     #define YY_REINTERPRET_CAST(Type, Val) ((Type)(Val))
0187   #endif
0188 #endif
0189 #ifndef YY_NULLPTR
0190   #if defined __cplusplus
0191     #if 201103L <= __cplusplus
0192       #define YY_NULLPTR nullptr
0193     #else
0194       #define YY_NULLPTR 0
0195     #endif
0196   #else
0197     #define YY_NULLPTR ((void*)0)
0198   #endif
0199 #endif
0200 
0201 /* Debug traces.  */
0202 #ifndef YYDEBUG
0203   #define YYDEBUG 0
0204 #endif
0205 
0206 namespace exptocas
0207 {
0208 
0209 /// A Bison parser.
0210 class parser
0211 {
0212 public:
0213 #ifndef YYSTYPE
0214   /// Symbol semantic values.
0215   union semantic_type {
0216 
0217     int                              num;
0218     char*                            str;
0219     TColStd_HSequenceOfHAsciiString* tlist;
0220     Express_HSequenceOfField*        flist;
0221     Express_HSequenceOfItem*         ilist;
0222     Express_Field*                   field;
0223     Express_Item*                    item;
0224     Express_Type*                    type;
0225     Express_Schema*                  schema;
0226     Express_Reference*               ref;
0227   };
0228 #else
0229   typedef YYSTYPE semantic_type;
0230 #endif
0231 
0232   /// Syntax errors thrown from user actions.
0233   struct syntax_error : std::runtime_error
0234   {
0235     syntax_error(const std::string& m)
0236         : std::runtime_error(m)
0237     {
0238     }
0239 
0240     syntax_error(const syntax_error& s)
0241         : std::runtime_error(s.what())
0242     {
0243     }
0244 
0245     ~syntax_error() YY_NOEXCEPT YY_NOTHROW;
0246   };
0247 
0248   /// Token kinds.
0249   struct token
0250   {
0251     enum token_kind_type
0252     {
0253       YYEMPTY = -2,
0254       YYEOF   = 0,   // "end of file"
0255       YYerror = 256, // error
0256       YYUNDEF = 257, // "invalid token"
0257       KSCHEM  = 258, // KSCHEM
0258       KENDS   = 259, // KENDS
0259       KTYP    = 260, // KTYP
0260       KENDT   = 261, // KENDT
0261       KENT    = 262, // KENT
0262       KENDE   = 263, // KENDE
0263       KREF    = 264, // KREF
0264       KFROM   = 265, // KFROM
0265       KSEL    = 266, // KSEL
0266       KENUM   = 267, // KENUM
0267       KLIST   = 268, // KLIST
0268       KARR    = 269, // KARR
0269       KBAG    = 270, // KBAG
0270       KSET    = 271, // KSET
0271       KOF     = 272, // KOF
0272       KNUM    = 273, // KNUM
0273       KINT    = 274, // KINT
0274       KDBL    = 275, // KDBL
0275       KSTR    = 276, // KSTR
0276       KLOG    = 277, // KLOG
0277       KBOOL   = 278, // KBOOL
0278       KOPT    = 279, // KOPT
0279       KUNIQ   = 280, // KUNIQ
0280       KSELF   = 281, // KSELF
0281       KABSTR  = 282, // KABSTR
0282       KSUBT   = 283, // KSUBT
0283       KSPRT   = 284, // KSPRT
0284       KANDOR  = 285, // KANDOR
0285       K1OF    = 286, // K1OF
0286       KAND    = 287, // KAND
0287       NUMBER  = 288, // NUMBER
0288       NAME    = 289  // NAME
0289     };
0290 
0291     /// Backward compatibility alias (Bison 3.6).
0292     typedef token_kind_type yytokentype;
0293   };
0294 
0295   /// Token kind, as returned by yylex.
0296   typedef token::yytokentype token_kind_type;
0297 
0298   /// Backward compatibility alias (Bison 3.6).
0299   typedef token_kind_type token_type;
0300 
0301   /// Symbol kinds.
0302   struct symbol_kind
0303   {
0304     enum symbol_kind_type
0305     {
0306       YYNTOKENS   = 46, ///< Number of tokens.
0307       S_YYEMPTY   = -2,
0308       S_YYEOF     = 0,  // "end of file"
0309       S_YYerror   = 1,  // error
0310       S_YYUNDEF   = 2,  // "invalid token"
0311       S_KSCHEM    = 3,  // KSCHEM
0312       S_KENDS     = 4,  // KENDS
0313       S_KTYP      = 5,  // KTYP
0314       S_KENDT     = 6,  // KENDT
0315       S_KENT      = 7,  // KENT
0316       S_KENDE     = 8,  // KENDE
0317       S_KREF      = 9,  // KREF
0318       S_KFROM     = 10, // KFROM
0319       S_KSEL      = 11, // KSEL
0320       S_KENUM     = 12, // KENUM
0321       S_KLIST     = 13, // KLIST
0322       S_KARR      = 14, // KARR
0323       S_KBAG      = 15, // KBAG
0324       S_KSET      = 16, // KSET
0325       S_KOF       = 17, // KOF
0326       S_KNUM      = 18, // KNUM
0327       S_KINT      = 19, // KINT
0328       S_KDBL      = 20, // KDBL
0329       S_KSTR      = 21, // KSTR
0330       S_KLOG      = 22, // KLOG
0331       S_KBOOL     = 23, // KBOOL
0332       S_KOPT      = 24, // KOPT
0333       S_KUNIQ     = 25, // KUNIQ
0334       S_KSELF     = 26, // KSELF
0335       S_KABSTR    = 27, // KABSTR
0336       S_KSUBT     = 28, // KSUBT
0337       S_KSPRT     = 29, // KSPRT
0338       S_KANDOR    = 30, // KANDOR
0339       S_K1OF      = 31, // K1OF
0340       S_KAND      = 32, // KAND
0341       S_NUMBER    = 33, // NUMBER
0342       S_NAME      = 34, // NAME
0343       S_35_       = 35, // ','
0344       S_36_       = 36, // ';'
0345       S_37_       = 37, // '='
0346       S_38_       = 38, // '('
0347       S_39_       = 39, // ')'
0348       S_40_       = 40, // '['
0349       S_41_       = 41, // ':'
0350       S_42_       = 42, // ']'
0351       S_43_       = 43, // '?'
0352       S_44_       = 44, // '\\'
0353       S_45_       = 45, // '.'
0354       S_YYACCEPT  = 46, // $accept
0355       S_SCHEMA    = 47, // SCHEMA
0356       S_ILIST     = 48, // ILIST
0357       S_ITEM      = 49, // ITEM
0358       S_ENUM      = 50, // ENUM
0359       S_SELECT    = 51, // SELECT
0360       S_ALIAS     = 52, // ALIAS
0361       S_ENTITY    = 53, // ENTITY
0362       S_REFERENCE = 54, // REFERENCE
0363       S_TLIST     = 55, // TLIST
0364       S_TLIST1    = 56, // TLIST1
0365       S_TYPE      = 57, // TYPE
0366       S_TSTD      = 58, // TSTD
0367       S_TNAME     = 59, // TNAME
0368       S_TSET      = 60, // TSET
0369       S_INDEX     = 61, // INDEX
0370       S_OPTUNI    = 62, // OPTUNI
0371       S_SUBT      = 63, // SUBT
0372       S_SUPERT    = 64, // SUPERT
0373       S_SUPLST    = 65, // SUPLST
0374       S_FLIST     = 66, // FLIST
0375       S_FLIST1    = 67, // FLIST1
0376       S_FIELD     = 68, // FIELD
0377       S_REDEF     = 69, // REDEF
0378       S_SPECIF    = 70, // SPECIF
0379       S_OPTNL     = 71, // OPTNL
0380       S_UNIQIT    = 72, // UNIQIT
0381       S_UNIQLS    = 73, // UNIQLS
0382       S_UNIQUE    = 74, // UNIQUE
0383       S_SPCLST    = 75  // SPCLST
0384     };
0385   };
0386 
0387   /// (Internal) symbol kind.
0388   typedef symbol_kind::symbol_kind_type symbol_kind_type;
0389 
0390   /// The number of tokens.
0391   static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
0392 
0393   /// A complete symbol.
0394   ///
0395   /// Expects its Base type to provide access to the symbol kind
0396   /// via kind ().
0397   ///
0398   /// Provide access to semantic value.
0399   template <typename Base>
0400   struct basic_symbol : Base
0401   {
0402     /// Alias to Base.
0403     typedef Base super_type;
0404 
0405     /// Default constructor.
0406     basic_symbol()
0407         : value()
0408     {
0409     }
0410 
0411 #if 201103L <= YY_CPLUSPLUS
0412     /// Move constructor.
0413     basic_symbol(basic_symbol&& that)
0414         : Base(std::move(that)),
0415           value(std::move(that.value))
0416     {
0417     }
0418 #endif
0419 
0420     /// Copy constructor.
0421     basic_symbol(const basic_symbol& that);
0422     /// Constructor for valueless symbols.
0423     basic_symbol(typename Base::kind_type t);
0424 
0425     /// Constructor for symbols with semantic value.
0426     basic_symbol(typename Base::kind_type t, YY_RVREF(semantic_type) v);
0427 
0428     /// Destroy the symbol.
0429     ~basic_symbol() { clear(); }
0430 
0431     /// Destroy contents, and record that is empty.
0432     void clear() { Base::clear(); }
0433 
0434 #if YYDEBUG || 0
0435     /// The user-facing name of this symbol.
0436     const char* name() const YY_NOEXCEPT { return parser::symbol_name(this->kind()); }
0437 #endif // #if YYDEBUG || 0
0438 
0439     /// Backward compatibility (Bison 3.6).
0440     symbol_kind_type type_get() const YY_NOEXCEPT;
0441 
0442     /// Whether empty.
0443     bool empty() const YY_NOEXCEPT;
0444 
0445     /// Destructive move, \a s is emptied into this.
0446     void move(basic_symbol& s);
0447 
0448     /// The semantic value.
0449     semantic_type value;
0450 
0451   private:
0452 #if YY_CPLUSPLUS < 201103L
0453     /// Assignment operator.
0454     basic_symbol& operator=(const basic_symbol& that);
0455 #endif
0456   };
0457 
0458   /// Type access provider for token (enum) based symbols.
0459   struct by_kind
0460   {
0461     /// Default constructor.
0462     by_kind();
0463 
0464 #if 201103L <= YY_CPLUSPLUS
0465     /// Move constructor.
0466     by_kind(by_kind&& that);
0467 #endif
0468 
0469     /// Copy constructor.
0470     by_kind(const by_kind& that);
0471 
0472     /// The symbol kind as needed by the constructor.
0473     typedef token_kind_type kind_type;
0474 
0475     /// Constructor from (external) token numbers.
0476     by_kind(kind_type t);
0477 
0478     /// Record that this symbol is empty.
0479     void clear();
0480 
0481     /// Steal the symbol kind from \a that.
0482     void move(by_kind& that);
0483 
0484     /// The (internal) type number (corresponding to \a type).
0485     /// \a empty when empty.
0486     symbol_kind_type kind() const YY_NOEXCEPT;
0487 
0488     /// Backward compatibility (Bison 3.6).
0489     symbol_kind_type type_get() const YY_NOEXCEPT;
0490 
0491     /// The symbol kind.
0492     /// \a S_YYEMPTY when empty.
0493     symbol_kind_type kind_;
0494   };
0495 
0496   /// Backward compatibility for a private implementation detail (Bison 3.6).
0497   typedef by_kind by_type;
0498 
0499   /// "External" symbols: returned by the scanner.
0500   struct symbol_type : basic_symbol<by_kind>
0501   {
0502   };
0503 
0504   /// Build a parser object.
0505   parser(exptocas::scanner* scanner_yyarg);
0506   virtual ~parser();
0507 
0508 #if 201103L <= YY_CPLUSPLUS
0509   /// Non copyable.
0510   parser(const parser&) = delete;
0511   /// Non copyable.
0512   parser& operator=(const parser&) = delete;
0513 #endif
0514 
0515   /// Parse.  An alias for parse ().
0516   /// \returns  0 iff parsing succeeded.
0517   int operator()();
0518 
0519   /// Parse.
0520   /// \returns  0 iff parsing succeeded.
0521   virtual int parse();
0522 
0523 #if YYDEBUG
0524   /// The current debugging stream.
0525   std::ostream& debug_stream() const YY_ATTRIBUTE_PURE;
0526   /// Set the current debugging stream.
0527   void set_debug_stream(std::ostream&);
0528 
0529   /// Type for debugging levels.
0530   typedef int debug_level_type;
0531   /// The current debugging level.
0532   debug_level_type debug_level() const YY_ATTRIBUTE_PURE;
0533   /// Set the current debugging level.
0534   void set_debug_level(debug_level_type l);
0535 #endif
0536 
0537   /// Report a syntax error.
0538   /// \param msg    a description of the syntax error.
0539   virtual void error(const std::string& msg);
0540 
0541   /// Report a syntax error.
0542   void error(const syntax_error& err);
0543 
0544 #if YYDEBUG || 0
0545   /// The user-facing name of the symbol whose (internal) number is
0546   /// YYSYMBOL.  No bounds checking.
0547   static const char* symbol_name(symbol_kind_type yysymbol);
0548 #endif // #if YYDEBUG || 0
0549 
0550 private:
0551 #if YY_CPLUSPLUS < 201103L
0552   /// Non copyable.
0553   parser(const parser&);
0554   /// Non copyable.
0555   parser& operator=(const parser&);
0556 #endif
0557 
0558   /// Stored state numbers (used for stacks).
0559   typedef unsigned char state_type;
0560 
0561   /// Compute post-reduction state.
0562   /// \param yystate   the current state
0563   /// \param yysym     the nonterminal to push on the stack
0564   static state_type yy_lr_goto_state_(state_type yystate, int yysym);
0565 
0566   /// Whether the given \c yypact_ value indicates a defaulted state.
0567   /// \param yyvalue   the value to check
0568   static bool yy_pact_value_is_default_(int yyvalue);
0569 
0570   /// Whether the given \c yytable_ value indicates a syntax error.
0571   /// \param yyvalue   the value to check
0572   static bool yy_table_value_is_error_(int yyvalue);
0573 
0574   static const short       yypact_ninf_;
0575   static const signed char yytable_ninf_;
0576 
0577   /// Convert a scanner token kind \a t to a symbol kind.
0578   /// In theory \a t should be a token_kind_type, but character literals
0579   /// are valid, yet not members of the token_type enum.
0580   static symbol_kind_type yytranslate_(int t);
0581 
0582 #if YYDEBUG || 0
0583   /// For a symbol, its name in clear.
0584   static const char* const yytname_[];
0585 #endif // #if YYDEBUG || 0
0586 
0587   // Tables.
0588   // YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
0589   // STATE-NUM.
0590   static const short yypact_[];
0591 
0592   // YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
0593   // Performed when YYTABLE does not specify something else to do.  Zero
0594   // means the default is an error.
0595   static const signed char yydefact_[];
0596 
0597   // YYPGOTO[NTERM-NUM].
0598   static const short yypgoto_[];
0599 
0600   // YYDEFGOTO[NTERM-NUM].
0601   static const short yydefgoto_[];
0602 
0603   // YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
0604   // positive, shift that token.  If negative, reduce the rule whose
0605   // number is the opposite.  If YYTABLE_NINF, syntax error.
0606   static const unsigned char yytable_[];
0607 
0608   static const short yycheck_[];
0609 
0610   // YYSTOS[STATE-NUM] -- The (internal number of the) accessing
0611   // symbol of state STATE-NUM.
0612   static const signed char yystos_[];
0613 
0614   // YYR1[YYN] -- Symbol number of symbol that rule YYN derives.
0615   static const signed char yyr1_[];
0616 
0617   // YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.
0618   static const signed char yyr2_[];
0619 
0620 #if YYDEBUG
0621   // YYRLINE[YYN] -- Source line where rule number YYN was defined.
0622   static const short yyrline_[];
0623   /// Report on the debug stream that the rule \a r is going to be reduced.
0624   virtual void yy_reduce_print_(int r) const;
0625   /// Print the state stack on the debug stream.
0626   virtual void yy_stack_print_() const;
0627 
0628   /// Debugging level.
0629   int yydebug_;
0630   /// Debug stream.
0631   std::ostream* yycdebug_;
0632 
0633   /// \brief Display a symbol kind, value and location.
0634   /// \param yyo    The output stream.
0635   /// \param yysym  The symbol.
0636   template <typename Base>
0637   void yy_print_(std::ostream& yyo, const basic_symbol<Base>& yysym) const;
0638 #endif
0639 
0640   /// \brief Reclaim the memory associated to a symbol.
0641   /// \param yymsg     Why this token is reclaimed.
0642   ///                  If null, print nothing.
0643   /// \param yysym     The symbol.
0644   template <typename Base>
0645   void yy_destroy_(const char* yymsg, basic_symbol<Base>& yysym) const;
0646 
0647 private:
0648   /// Type access provider for state based symbols.
0649   struct by_state
0650   {
0651     /// Default constructor.
0652     by_state() YY_NOEXCEPT;
0653 
0654     /// The symbol kind as needed by the constructor.
0655     typedef state_type kind_type;
0656 
0657     /// Constructor.
0658     by_state(kind_type s) YY_NOEXCEPT;
0659 
0660     /// Copy constructor.
0661     by_state(const by_state& that) YY_NOEXCEPT;
0662 
0663     /// Record that this symbol is empty.
0664     void clear() YY_NOEXCEPT;
0665 
0666     /// Steal the symbol kind from \a that.
0667     void move(by_state& that);
0668 
0669     /// The symbol kind (corresponding to \a state).
0670     /// \a symbol_kind::S_YYEMPTY when empty.
0671     symbol_kind_type kind() const YY_NOEXCEPT;
0672 
0673     /// The state number used to denote an empty symbol.
0674     /// We use the initial state, as it does not have a value.
0675     enum
0676     {
0677       empty_state = 0
0678     };
0679 
0680     /// The state.
0681     /// \a empty when empty.
0682     state_type state;
0683   };
0684 
0685   /// "Internal" symbol: element of the stack.
0686   struct stack_symbol_type : basic_symbol<by_state>
0687   {
0688     /// Superclass.
0689     typedef basic_symbol<by_state> super_type;
0690     /// Construct an empty symbol.
0691     stack_symbol_type();
0692     /// Move or copy construction.
0693     stack_symbol_type(YY_RVREF(stack_symbol_type) that);
0694     /// Steal the contents from \a sym to build this.
0695     stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) sym);
0696 #if YY_CPLUSPLUS < 201103L
0697     /// Assignment, needed by push_back by some old implementations.
0698     /// Moves the contents of that.
0699     stack_symbol_type& operator=(stack_symbol_type& that);
0700 
0701     /// Assignment, needed by push_back by other implementations.
0702     /// Needed by some other old implementations.
0703     stack_symbol_type& operator=(const stack_symbol_type& that);
0704 #endif
0705   };
0706 
0707   /// A stack with random access from its top.
0708   template <typename T, typename S = std::vector<T>>
0709   class stack
0710   {
0711   public:
0712     // Hide our reversed order.
0713     typedef typename S::iterator       iterator;
0714     typedef typename S::const_iterator const_iterator;
0715     typedef typename S::size_type      size_type;
0716     typedef typename std::ptrdiff_t    index_type;
0717 
0718     stack(size_type n = 200)
0719         : seq_(n)
0720     {
0721     }
0722 
0723 #if 201103L <= YY_CPLUSPLUS
0724     /// Non copyable.
0725     stack(const stack&) = delete;
0726     /// Non copyable.
0727     stack& operator=(const stack&) = delete;
0728 #endif
0729 
0730     /// Random access.
0731     ///
0732     /// Index 0 returns the topmost element.
0733     const T& operator[](index_type i) const { return seq_[size_type(size() - 1 - i)]; }
0734 
0735     /// Random access.
0736     ///
0737     /// Index 0 returns the topmost element.
0738     T& operator[](index_type i) { return seq_[size_type(size() - 1 - i)]; }
0739 
0740     /// Steal the contents of \a t.
0741     ///
0742     /// Close to move-semantics.
0743     void push(YY_MOVE_REF(T) t)
0744     {
0745       seq_.push_back(T());
0746       operator[](0).move(t);
0747     }
0748 
0749     /// Pop elements from the stack.
0750     void pop(std::ptrdiff_t n = 1) YY_NOEXCEPT
0751     {
0752       for (; 0 < n; --n)
0753         seq_.pop_back();
0754     }
0755 
0756     /// Pop all elements from the stack.
0757     void clear() YY_NOEXCEPT { seq_.clear(); }
0758 
0759     /// Number of elements on the stack.
0760     index_type size() const YY_NOEXCEPT { return index_type(seq_.size()); }
0761 
0762     /// Iterator on top of the stack (going downwards).
0763     const_iterator begin() const YY_NOEXCEPT { return seq_.begin(); }
0764 
0765     /// Bottom of the stack.
0766     const_iterator end() const YY_NOEXCEPT { return seq_.end(); }
0767 
0768     /// Present a slice of the top of a stack.
0769     class slice
0770     {
0771     public:
0772       slice(const stack& stack, index_type range)
0773           : stack_(stack),
0774             range_(range)
0775       {
0776       }
0777 
0778       const T& operator[](index_type i) const { return stack_[range_ - i]; }
0779 
0780     private:
0781       const stack& stack_;
0782       index_type   range_;
0783     };
0784 
0785   private:
0786 #if YY_CPLUSPLUS < 201103L
0787     /// Non copyable.
0788     stack(const stack&);
0789     /// Non copyable.
0790     stack& operator=(const stack&);
0791 #endif
0792     /// The wrapped container.
0793     S seq_;
0794   };
0795 
0796   /// Stack type.
0797   typedef stack<stack_symbol_type> stack_type;
0798 
0799   /// The stack.
0800   stack_type yystack_;
0801 
0802   /// Push a new state on the stack.
0803   /// \param m    a debug message to display
0804   ///             if null, no trace is output.
0805   /// \param sym  the symbol
0806   /// \warning the contents of \a s.value is stolen.
0807   void yypush_(const char* m, YY_MOVE_REF(stack_symbol_type) sym);
0808 
0809   /// Push a new look ahead token on the state on the stack.
0810   /// \param m    a debug message to display
0811   ///             if null, no trace is output.
0812   /// \param s    the state
0813   /// \param sym  the symbol (for its value and location).
0814   /// \warning the contents of \a sym.value is stolen.
0815   void yypush_(const char* m, state_type s, YY_MOVE_REF(symbol_type) sym);
0816 
0817   /// Pop \a n symbols from the stack.
0818   void yypop_(int n = 1);
0819 
0820   /// Constants.
0821   enum
0822   {
0823     yylast_  = 164, ///< Last index in yytable_.
0824     yynnts_  = 30,  ///< Number of nonterminal symbols.
0825     yyfinal_ = 4    ///< Termination state number.
0826   };
0827 
0828   // User arguments.
0829   exptocas::scanner* scanner;
0830 };
0831 
0832 } // namespace exptocas
0833 
0834 // "%code provides" blocks.
0835 
0836 #if !defined(yyFlexLexer) && !defined(FlexLexerOnce)
0837   #define yyFlexLexer exptocasFlexLexer
0838   #include "FlexLexer.h"
0839 #endif
0840 namespace exptocas
0841 {
0842 // To feed data back to bison, the yylex method needs yylval and
0843 // yylloc parameters. Since the exptocasFlexLexer class is defined in the
0844 // system header <FlexLexer.h> the signature of its yylex() method
0845 // can not be changed anymore. This makes it necessary to derive a
0846 // scanner class that provides a method with the desired signature:
0847 class scanner : public exptocasFlexLexer
0848 {
0849 public:
0850   explicit scanner(std::istream* in = 0, std::ostream* out = 0);
0851 
0852   int lex(exptocas::parser::semantic_type* yylval);
0853 };
0854 }; // namespace exptocas
0855 
0856 #endif // !YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED