File indexing completed on 2025-01-18 10:05:01
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 #ifndef YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0046 # define YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0047
0048
0049
0050
0051
0052 #include <StepFile_ReadData.hxx>
0053 namespace step {
0054 class scanner;
0055 };
0056
0057 #ifdef _MSC_VER
0058
0059 #pragma warning(disable: 4522)
0060
0061 #pragma warning(disable: 4512)
0062 #endif
0063
0064
0065
0066
0067 # include <cstdlib> // std::abort
0068 # include <iostream>
0069 # include <stdexcept>
0070 # include <string>
0071 # include <vector>
0072
0073 #if defined __cplusplus
0074 # define YY_CPLUSPLUS __cplusplus
0075 #else
0076 # define YY_CPLUSPLUS 199711L
0077 #endif
0078
0079
0080 #if 201103L <= YY_CPLUSPLUS
0081 # define YY_MOVE std::move
0082 # define YY_MOVE_OR_COPY move
0083 # define YY_MOVE_REF(Type) Type&&
0084 # define YY_RVREF(Type) Type&&
0085 # define YY_COPY(Type) Type
0086 #else
0087 # define YY_MOVE
0088 # define YY_MOVE_OR_COPY copy
0089 # define YY_MOVE_REF(Type) Type&
0090 # define YY_RVREF(Type) const Type&
0091 # define YY_COPY(Type) const Type&
0092 #endif
0093
0094
0095 #if 201103L <= YY_CPLUSPLUS
0096 # define YY_NOEXCEPT noexcept
0097 # define YY_NOTHROW
0098 #else
0099 # define YY_NOEXCEPT
0100 # define YY_NOTHROW throw ()
0101 #endif
0102
0103
0104 #if 201703 <= YY_CPLUSPLUS
0105 # define YY_CONSTEXPR constexpr
0106 #else
0107 # define YY_CONSTEXPR
0108 #endif
0109
0110
0111
0112 #ifndef YY_ATTRIBUTE_PURE
0113 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
0114 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
0115 # else
0116 # define YY_ATTRIBUTE_PURE
0117 # endif
0118 #endif
0119
0120 #ifndef YY_ATTRIBUTE_UNUSED
0121 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
0122 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
0123 # else
0124 # define YY_ATTRIBUTE_UNUSED
0125 # endif
0126 #endif
0127
0128
0129 #if ! defined lint || defined __GNUC__
0130 # define YYUSE(E) ((void) (E))
0131 #else
0132 # define YYUSE(E)
0133 #endif
0134
0135 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
0136
0137 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
0138 _Pragma ("GCC diagnostic push") \
0139 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
0140 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
0141 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
0142 _Pragma ("GCC diagnostic pop")
0143 #else
0144 # define YY_INITIAL_VALUE(Value) Value
0145 #endif
0146 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0147 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
0148 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
0149 #endif
0150 #ifndef YY_INITIAL_VALUE
0151 # define YY_INITIAL_VALUE(Value)
0152 #endif
0153
0154 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
0155 # define YY_IGNORE_USELESS_CAST_BEGIN \
0156 _Pragma ("GCC diagnostic push") \
0157 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
0158 # define YY_IGNORE_USELESS_CAST_END \
0159 _Pragma ("GCC diagnostic pop")
0160 #endif
0161 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
0162 # define YY_IGNORE_USELESS_CAST_BEGIN
0163 # define YY_IGNORE_USELESS_CAST_END
0164 #endif
0165
0166 # ifndef YY_CAST
0167 # ifdef __cplusplus
0168 # define YY_CAST(Type, Val) static_cast<Type> (Val)
0169 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
0170 # else
0171 # define YY_CAST(Type, Val) ((Type) (Val))
0172 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
0173 # endif
0174 # endif
0175 # ifndef YY_NULLPTR
0176 # if defined __cplusplus
0177 # if 201103L <= __cplusplus
0178 # define YY_NULLPTR nullptr
0179 # else
0180 # define YY_NULLPTR 0
0181 # endif
0182 # else
0183 # define YY_NULLPTR ((void*)0)
0184 # endif
0185 # endif
0186
0187
0188 #ifndef YYDEBUG
0189 # define YYDEBUG 0
0190 #endif
0191
0192 namespace step {
0193
0194
0195
0196
0197
0198 class parser
0199 {
0200 public:
0201 #ifndef YYSTYPE
0202
0203 typedef int semantic_type;
0204 #else
0205 typedef YYSTYPE semantic_type;
0206 #endif
0207
0208
0209 struct syntax_error : std::runtime_error
0210 {
0211 syntax_error (const std::string& m)
0212 : std::runtime_error (m)
0213 {}
0214
0215 syntax_error (const syntax_error& s)
0216 : std::runtime_error (s.what ())
0217 {}
0218
0219 ~syntax_error () YY_NOEXCEPT YY_NOTHROW;
0220 };
0221
0222
0223 struct token
0224 {
0225 enum token_kind_type
0226 {
0227 YYEMPTY = -2,
0228 YYEOF = 0,
0229 YYerror = 256,
0230 YYUNDEF = 257,
0231 STEP = 258,
0232 HEADER = 259,
0233 ENDSEC = 260,
0234 DATA = 261,
0235 ENDSTEP = 262,
0236 SCOPE = 263,
0237 ENDSCOPE = 264,
0238 ENTITY = 265,
0239 TYPE = 266,
0240 INTEGER = 267,
0241 FLOAT = 268,
0242 IDENT = 269,
0243 TEXT = 270,
0244 NONDEF = 271,
0245 ENUM = 272,
0246 HEXA = 273,
0247 QUID = 274
0248 };
0249
0250 typedef token_kind_type yytokentype;
0251 };
0252
0253
0254 typedef token::yytokentype token_kind_type;
0255
0256
0257 typedef token_kind_type token_type;
0258
0259
0260 struct symbol_kind
0261 {
0262 enum symbol_kind_type
0263 {
0264 YYNTOKENS = 27,
0265 S_YYEMPTY = -2,
0266 S_YYEOF = 0,
0267 S_YYerror = 1,
0268 S_YYUNDEF = 2,
0269 S_STEP = 3,
0270 S_HEADER = 4,
0271 S_ENDSEC = 5,
0272 S_DATA = 6,
0273 S_ENDSTEP = 7,
0274 S_SCOPE = 8,
0275 S_ENDSCOPE = 9,
0276 S_ENTITY = 10,
0277 S_TYPE = 11,
0278 S_INTEGER = 12,
0279 S_FLOAT = 13,
0280 S_IDENT = 14,
0281 S_TEXT = 15,
0282 S_NONDEF = 16,
0283 S_ENUM = 17,
0284 S_HEXA = 18,
0285 S_QUID = 19,
0286 S_20_ = 20,
0287 S_21_ = 21,
0288 S_22_ = 22,
0289 S_23_ = 23,
0290 S_24_ = 24,
0291 S_25_ = 25,
0292 S_26_ = 26,
0293 S_YYACCEPT = 27,
0294 S_finvide = 28,
0295 S_finstep = 29,
0296 S_stepf1 = 30,
0297 S_stepf2 = 31,
0298 S_stepf3 = 32,
0299 S_stepf = 33,
0300 S_headl = 34,
0301 S_headent = 35,
0302 S_endhead = 36,
0303 S_unarg = 37,
0304 S_listype = 38,
0305 S_deblist = 39,
0306 S_finlist = 40,
0307 S_listarg = 41,
0308 S_arglist = 42,
0309 S_model = 43,
0310 S_bloc = 44,
0311 S_plex = 45,
0312 S_unent = 46,
0313 S_debscop = 47,
0314 S_unid = 48,
0315 S_export = 49,
0316 S_debexp = 50,
0317 S_finscop = 51,
0318 S_entlab = 52,
0319 S_enttype = 53
0320 };
0321 };
0322
0323
0324 typedef symbol_kind::symbol_kind_type symbol_kind_type;
0325
0326
0327 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
0328
0329
0330
0331
0332
0333
0334
0335 template <typename Base>
0336 struct basic_symbol : Base
0337 {
0338
0339 typedef Base super_type;
0340
0341
0342 basic_symbol ()
0343 : value ()
0344 {}
0345
0346 #if 201103L <= YY_CPLUSPLUS
0347
0348 basic_symbol (basic_symbol&& that)
0349 : Base (std::move (that))
0350 , value (std::move (that.value))
0351 {}
0352 #endif
0353
0354
0355 basic_symbol (const basic_symbol& that);
0356
0357 basic_symbol (typename Base::kind_type t);
0358
0359
0360 basic_symbol (typename Base::kind_type t,
0361 YY_RVREF (semantic_type) v);
0362
0363
0364 ~basic_symbol ()
0365 {
0366 clear ();
0367 }
0368
0369
0370 void clear ()
0371 {
0372 Base::clear ();
0373 }
0374
0375
0376 std::string name () const YY_NOEXCEPT
0377 {
0378 return parser::symbol_name (this->kind ());
0379 }
0380
0381
0382 symbol_kind_type type_get () const YY_NOEXCEPT;
0383
0384
0385 bool empty () const YY_NOEXCEPT;
0386
0387
0388 void move (basic_symbol& s);
0389
0390
0391 semantic_type value;
0392
0393 private:
0394 #if YY_CPLUSPLUS < 201103L
0395
0396 basic_symbol& operator= (const basic_symbol& that);
0397 #endif
0398 };
0399
0400
0401 struct by_kind
0402 {
0403
0404 by_kind ();
0405
0406 #if 201103L <= YY_CPLUSPLUS
0407
0408 by_kind (by_kind&& that);
0409 #endif
0410
0411
0412 by_kind (const by_kind& that);
0413
0414
0415 typedef token_kind_type kind_type;
0416
0417
0418 by_kind (kind_type t);
0419
0420
0421 void clear ();
0422
0423
0424 void move (by_kind& that);
0425
0426
0427
0428 symbol_kind_type kind () const YY_NOEXCEPT;
0429
0430
0431 symbol_kind_type type_get () const YY_NOEXCEPT;
0432
0433
0434
0435 symbol_kind_type kind_;
0436 };
0437
0438
0439 typedef by_kind by_type;
0440
0441
0442 struct symbol_type : basic_symbol<by_kind>
0443 {};
0444
0445
0446 parser (step::scanner* scanner_yyarg);
0447 virtual ~parser ();
0448
0449 #if 201103L <= YY_CPLUSPLUS
0450
0451 parser (const parser&) = delete;
0452
0453 parser& operator= (const parser&) = delete;
0454 #endif
0455
0456
0457
0458 int operator() ();
0459
0460
0461
0462 virtual int parse ();
0463
0464 #if YYDEBUG
0465
0466 std::ostream& debug_stream () const YY_ATTRIBUTE_PURE;
0467
0468 void set_debug_stream (std::ostream &);
0469
0470
0471 typedef int debug_level_type;
0472
0473 debug_level_type debug_level () const YY_ATTRIBUTE_PURE;
0474
0475 void set_debug_level (debug_level_type l);
0476 #endif
0477
0478
0479
0480 virtual void error (const std::string& msg);
0481
0482
0483 void error (const syntax_error& err);
0484
0485
0486
0487 static std::string symbol_name (symbol_kind_type yysymbol);
0488
0489
0490
0491 class context
0492 {
0493 public:
0494 context (const parser& yyparser, const symbol_type& yyla);
0495 const symbol_type& lookahead () const { return yyla_; }
0496 symbol_kind_type token () const { return yyla_.kind (); }
0497
0498
0499
0500 int expected_tokens (symbol_kind_type yyarg[], int yyargn) const;
0501
0502 private:
0503 const parser& yyparser_;
0504 const symbol_type& yyla_;
0505 };
0506
0507 private:
0508 #if YY_CPLUSPLUS < 201103L
0509
0510 parser (const parser&);
0511
0512 parser& operator= (const parser&);
0513 #endif
0514
0515
0516
0517 typedef signed char state_type;
0518
0519
0520 int yy_syntax_error_arguments_ (const context& yyctx,
0521 symbol_kind_type yyarg[], int yyargn) const;
0522
0523
0524
0525 virtual std::string yysyntax_error_ (const context& yyctx) const;
0526
0527
0528
0529 static state_type yy_lr_goto_state_ (state_type yystate, int yysym);
0530
0531
0532
0533 static bool yy_pact_value_is_default_ (int yyvalue);
0534
0535
0536
0537 static bool yy_table_value_is_error_ (int yyvalue);
0538
0539 static const signed char yypact_ninf_;
0540 static const signed char yytable_ninf_;
0541
0542
0543
0544
0545 static symbol_kind_type yytranslate_ (int t);
0546
0547
0548 static std::string yytnamerr_ (const char *yystr);
0549
0550
0551 static const char* const yytname_[];
0552
0553
0554
0555
0556
0557 static const signed char yypact_[];
0558
0559
0560
0561
0562 static const signed char yydefact_[];
0563
0564
0565 static const signed char yypgoto_[];
0566
0567
0568 static const signed char yydefgoto_[];
0569
0570
0571
0572
0573 static const signed char yytable_[];
0574
0575 static const signed char yycheck_[];
0576
0577
0578
0579 static const signed char yystos_[];
0580
0581
0582 static const signed char yyr1_[];
0583
0584
0585 static const signed char yyr2_[];
0586
0587
0588 #if YYDEBUG
0589
0590 static const unsigned char yyrline_[];
0591
0592 virtual void yy_reduce_print_ (int r) const;
0593
0594 virtual void yy_stack_print_ () const;
0595
0596
0597 int yydebug_;
0598
0599 std::ostream* yycdebug_;
0600
0601
0602
0603
0604 template <typename Base>
0605 void yy_print_ (std::ostream& yyo, const basic_symbol<Base>& yysym) const;
0606 #endif
0607
0608
0609
0610
0611
0612 template <typename Base>
0613 void yy_destroy_ (const char* yymsg, basic_symbol<Base>& yysym) const;
0614
0615 private:
0616
0617 struct by_state
0618 {
0619
0620 by_state () YY_NOEXCEPT;
0621
0622
0623 typedef state_type kind_type;
0624
0625
0626 by_state (kind_type s) YY_NOEXCEPT;
0627
0628
0629 by_state (const by_state& that) YY_NOEXCEPT;
0630
0631
0632 void clear () YY_NOEXCEPT;
0633
0634
0635 void move (by_state& that);
0636
0637
0638
0639 symbol_kind_type kind () const YY_NOEXCEPT;
0640
0641
0642
0643 enum { empty_state = 0 };
0644
0645
0646
0647 state_type state;
0648 };
0649
0650
0651 struct stack_symbol_type : basic_symbol<by_state>
0652 {
0653
0654 typedef basic_symbol<by_state> super_type;
0655
0656 stack_symbol_type ();
0657
0658 stack_symbol_type (YY_RVREF (stack_symbol_type) that);
0659
0660 stack_symbol_type (state_type s, YY_MOVE_REF (symbol_type) sym);
0661 #if YY_CPLUSPLUS < 201103L
0662
0663
0664 stack_symbol_type& operator= (stack_symbol_type& that);
0665
0666
0667
0668 stack_symbol_type& operator= (const stack_symbol_type& that);
0669 #endif
0670 };
0671
0672
0673 template <typename T, typename S = std::vector<T> >
0674 class stack
0675 {
0676 public:
0677
0678 typedef typename S::iterator iterator;
0679 typedef typename S::const_iterator const_iterator;
0680 typedef typename S::size_type size_type;
0681 typedef typename std::ptrdiff_t index_type;
0682
0683 stack (size_type n = 200)
0684 : seq_ (n)
0685 {}
0686
0687 #if 201103L <= YY_CPLUSPLUS
0688
0689 stack (const stack&) = delete;
0690
0691 stack& operator= (const stack&) = delete;
0692 #endif
0693
0694
0695
0696
0697 const T&
0698 operator[] (index_type i) const
0699 {
0700 return seq_[size_type (size () - 1 - i)];
0701 }
0702
0703
0704
0705
0706 T&
0707 operator[] (index_type i)
0708 {
0709 return seq_[size_type (size () - 1 - i)];
0710 }
0711
0712
0713
0714
0715 void
0716 push (YY_MOVE_REF (T) t)
0717 {
0718 seq_.push_back (T ());
0719 operator[] (0).move (t);
0720 }
0721
0722
0723 void
0724 pop (std::ptrdiff_t n = 1) YY_NOEXCEPT
0725 {
0726 for (; 0 < n; --n)
0727 seq_.pop_back ();
0728 }
0729
0730
0731 void
0732 clear () YY_NOEXCEPT
0733 {
0734 seq_.clear ();
0735 }
0736
0737
0738 index_type
0739 size () const YY_NOEXCEPT
0740 {
0741 return index_type (seq_.size ());
0742 }
0743
0744
0745 const_iterator
0746 begin () const YY_NOEXCEPT
0747 {
0748 return seq_.begin ();
0749 }
0750
0751
0752 const_iterator
0753 end () const YY_NOEXCEPT
0754 {
0755 return seq_.end ();
0756 }
0757
0758
0759 class slice
0760 {
0761 public:
0762 slice (const stack& stack, index_type range)
0763 : stack_ (stack)
0764 , range_ (range)
0765 {}
0766
0767 const T&
0768 operator[] (index_type i) const
0769 {
0770 return stack_[range_ - i];
0771 }
0772
0773 private:
0774 const stack& stack_;
0775 index_type range_;
0776 };
0777
0778 private:
0779 #if YY_CPLUSPLUS < 201103L
0780
0781 stack (const stack&);
0782
0783 stack& operator= (const stack&);
0784 #endif
0785
0786 S seq_;
0787 };
0788
0789
0790
0791 typedef stack<stack_symbol_type> stack_type;
0792
0793
0794 stack_type yystack_;
0795
0796
0797
0798
0799
0800
0801 void yypush_ (const char* m, YY_MOVE_REF (stack_symbol_type) sym);
0802
0803
0804
0805
0806
0807
0808
0809 void yypush_ (const char* m, state_type s, YY_MOVE_REF (symbol_type) sym);
0810
0811
0812 void yypop_ (int n = 1);
0813
0814
0815 enum
0816 {
0817 yylast_ = 82,
0818 yynnts_ = 27,
0819 yyfinal_ = 7
0820 };
0821
0822
0823
0824 step::scanner* scanner;
0825
0826 };
0827
0828
0829 }
0830
0831
0832
0833
0834
0835
0836 #if !defined(yyFlexLexer) && !defined(FlexLexerOnce)
0837 #define yyFlexLexer stepFlexLexer
0838 #include "FlexLexer.h"
0839 #endif
0840
0841 namespace step {
0842
0843
0844
0845
0846
0847
0848
0849 class scanner : public stepFlexLexer
0850 {
0851 public:
0852 explicit scanner(StepFile_ReadData* theDataModel, std::istream* in = 0, std::ostream* out = 0);
0853
0854 int lex(step::parser::semantic_type* yylval);
0855
0856 StepFile_ReadData* myDataModel;
0857 };
0858
0859 };
0860
0861
0862
0863 #endif