File indexing completed on 2026-09-19 09:29:19
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
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 #ifndef YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0060 #define YY_STEP_STEPFILE_STEP_TAB_HXX_INCLUDED
0061
0062
0063
0064
0065
0066 #include <StepFile_ReadData.hxx>
0067
0068 namespace step
0069 {
0070 class scanner;
0071 };
0072
0073 #ifdef _MSC_VER
0074
0075 #pragma warning(disable : 4522)
0076
0077
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
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
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
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
0141 #if !defined lint || defined __GNUC__
0142 #define YYUSE(E) ((void)(E))
0143 #else
0144 #define YYUSE(E)
0145 #endif
0146
0147 #if defined __GNUC__ && !defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
0148
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)
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
0196 #ifndef YYDEBUG
0197 #define YYDEBUG 0
0198 #endif
0199
0200 namespace step
0201 {
0202
0203
0204 class parser
0205 {
0206 public:
0207 #ifndef YYSTYPE
0208
0209 typedef int semantic_type;
0210 #else
0211 typedef YYSTYPE semantic_type;
0212 #endif
0213
0214
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
0231 struct token
0232 {
0233 enum token_kind_type
0234 {
0235 YYEMPTY = -2,
0236 YYEOF = 0,
0237 YYerror = 256,
0238 YYUNDEF = 257,
0239 STEP = 258,
0240 HEADER = 259,
0241 ENDSEC = 260,
0242 DATA = 261,
0243 ENDSTEP = 262,
0244 SCOPE = 263,
0245 ENDSCOPE = 264,
0246 ENTITY = 265,
0247 TYPE = 266,
0248 INTEGER = 267,
0249 FLOAT = 268,
0250 IDENT = 269,
0251 TEXT = 270,
0252 NONDEF = 271,
0253 ENUM = 272,
0254 HEXA = 273,
0255 QUID = 274
0256 };
0257
0258
0259 typedef token_kind_type yytokentype;
0260 };
0261
0262
0263 typedef token::yytokentype token_kind_type;
0264
0265
0266 typedef token_kind_type token_type;
0267
0268
0269 struct symbol_kind
0270 {
0271 enum symbol_kind_type
0272 {
0273 YYNTOKENS = 27,
0274 S_YYEMPTY = -2,
0275 S_YYEOF = 0,
0276 S_YYerror = 1,
0277 S_YYUNDEF = 2,
0278 S_STEP = 3,
0279 S_HEADER = 4,
0280 S_ENDSEC = 5,
0281 S_DATA = 6,
0282 S_ENDSTEP = 7,
0283 S_SCOPE = 8,
0284 S_ENDSCOPE = 9,
0285 S_ENTITY = 10,
0286 S_TYPE = 11,
0287 S_INTEGER = 12,
0288 S_FLOAT = 13,
0289 S_IDENT = 14,
0290 S_TEXT = 15,
0291 S_NONDEF = 16,
0292 S_ENUM = 17,
0293 S_HEXA = 18,
0294 S_QUID = 19,
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,
0303 S_finvide = 28,
0304 S_finstep = 29,
0305 S_stepf1 = 30,
0306 S_stepf2 = 31,
0307 S_stepf3 = 32,
0308 S_stepf = 33,
0309 S_headl = 34,
0310 S_headent = 35,
0311 S_endhead = 36,
0312 S_unarg = 37,
0313 S_listype = 38,
0314 S_deblist = 39,
0315 S_finlist = 40,
0316 S_listarg = 41,
0317 S_arglist = 42,
0318 S_model = 43,
0319 S_bloc = 44,
0320 S_plex = 45,
0321 S_unent = 46,
0322 S_debscop = 47,
0323 S_unid = 48,
0324 S_export = 49,
0325 S_debexp = 50,
0326 S_finscop = 51,
0327 S_entlab = 52,
0328 S_enttype = 53
0329 };
0330 };
0331
0332
0333 typedef symbol_kind::symbol_kind_type symbol_kind_type;
0334
0335
0336 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
0337
0338
0339
0340
0341
0342
0343
0344 template <typename Base>
0345 struct basic_symbol : Base
0346 {
0347
0348 typedef Base super_type;
0349
0350
0351 basic_symbol()
0352 : value()
0353 {
0354 }
0355
0356 #if 201103L <= YY_CPLUSPLUS
0357
0358 basic_symbol(basic_symbol&& that)
0359 : Base(std::move(that)),
0360 value(std::move(that.value))
0361 {
0362 }
0363 #endif
0364
0365
0366 basic_symbol(const basic_symbol& that);
0367
0368 basic_symbol(typename Base::kind_type t);
0369
0370
0371 basic_symbol(typename Base::kind_type t, YY_RVREF(semantic_type) v);
0372
0373
0374 ~basic_symbol() { clear(); }
0375
0376
0377 void clear() { Base::clear(); }
0378
0379
0380 std::string name() const YY_NOEXCEPT { return parser::symbol_name(this->kind()); }
0381
0382
0383 symbol_kind_type type_get() const YY_NOEXCEPT;
0384
0385
0386 bool empty() const YY_NOEXCEPT;
0387
0388
0389 void move(basic_symbol& s);
0390
0391
0392 semantic_type value;
0393
0394 private:
0395 #if YY_CPLUSPLUS < 201103L
0396
0397 basic_symbol& operator=(const basic_symbol& that);
0398 #endif
0399 };
0400
0401
0402 struct by_kind
0403 {
0404
0405 by_kind();
0406
0407 #if 201103L <= YY_CPLUSPLUS
0408
0409 by_kind(by_kind&& that);
0410 #endif
0411
0412
0413 by_kind(const by_kind& that);
0414
0415
0416 typedef token_kind_type kind_type;
0417
0418
0419 by_kind(kind_type t);
0420
0421
0422 void clear();
0423
0424
0425 void move(by_kind& that);
0426
0427
0428
0429 symbol_kind_type kind() const YY_NOEXCEPT;
0430
0431
0432 symbol_kind_type type_get() const YY_NOEXCEPT;
0433
0434
0435
0436 symbol_kind_type kind_;
0437 };
0438
0439
0440 typedef by_kind by_type;
0441
0442
0443 struct symbol_type : basic_symbol<by_kind>
0444 {
0445 };
0446
0447
0448 parser(step::scanner* scanner_yyarg);
0449 virtual ~parser();
0450
0451 #if 201103L <= YY_CPLUSPLUS
0452
0453 parser(const parser&) = delete;
0454
0455 parser& operator=(const parser&) = delete;
0456 #endif
0457
0458
0459
0460 int operator()();
0461
0462
0463
0464 virtual int parse();
0465
0466 #if YYDEBUG
0467
0468 std::ostream& debug_stream() const YY_ATTRIBUTE_PURE;
0469
0470 void set_debug_stream(std::ostream&);
0471
0472
0473 typedef int debug_level_type;
0474
0475 debug_level_type debug_level() const YY_ATTRIBUTE_PURE;
0476
0477 void set_debug_level(debug_level_type l);
0478 #endif
0479
0480
0481
0482 virtual void error(const std::string& msg);
0483
0484
0485 void error(const syntax_error& err);
0486
0487
0488
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
0501
0502
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
0513 parser(const parser&);
0514
0515 parser& operator=(const parser&);
0516 #endif
0517
0518
0519 typedef signed char state_type;
0520
0521
0522 int yy_syntax_error_arguments_(const context& yyctx, symbol_kind_type yyarg[], int yyargn) const;
0523
0524
0525
0526 virtual std::string yysyntax_error_(const context& yyctx) const;
0527
0528
0529
0530 static state_type yy_lr_goto_state_(state_type yystate, int yysym);
0531
0532
0533
0534 static bool yy_pact_value_is_default_(int yyvalue);
0535
0536
0537
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
0544
0545
0546 static symbol_kind_type yytranslate_(int t);
0547
0548
0549 static std::string yytnamerr_(const char* yystr);
0550
0551
0552 static const char* const yytname_[];
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 #if YYDEBUG
0588
0589 static const unsigned char yyrline_[];
0590
0591 virtual void yy_reduce_print_(int r) const;
0592
0593 virtual void yy_stack_print_() const;
0594
0595
0596 int yydebug_;
0597
0598 std::ostream* yycdebug_;
0599
0600
0601
0602
0603 template <typename Base>
0604 void yy_print_(std::ostream& yyo, const basic_symbol<Base>& yysym) const;
0605 #endif
0606
0607
0608
0609
0610
0611 template <typename Base>
0612 void yy_destroy_(const char* yymsg, basic_symbol<Base>& yysym) const;
0613
0614 private:
0615
0616 struct by_state
0617 {
0618
0619 by_state() YY_NOEXCEPT;
0620
0621
0622 typedef state_type kind_type;
0623
0624
0625 by_state(kind_type s) YY_NOEXCEPT;
0626
0627
0628 by_state(const by_state& that) YY_NOEXCEPT;
0629
0630
0631 void clear() YY_NOEXCEPT;
0632
0633
0634 void move(by_state& that);
0635
0636
0637
0638 symbol_kind_type kind() const YY_NOEXCEPT;
0639
0640
0641
0642 enum
0643 {
0644 empty_state = 0
0645 };
0646
0647
0648
0649 state_type state;
0650 };
0651
0652
0653 struct stack_symbol_type : basic_symbol<by_state>
0654 {
0655
0656 typedef basic_symbol<by_state> super_type;
0657
0658 stack_symbol_type();
0659
0660 stack_symbol_type(YY_RVREF(stack_symbol_type) that);
0661
0662 stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) sym);
0663 #if YY_CPLUSPLUS < 201103L
0664
0665
0666 stack_symbol_type& operator=(stack_symbol_type& that);
0667
0668
0669
0670 stack_symbol_type& operator=(const stack_symbol_type& that);
0671 #endif
0672 };
0673
0674
0675 template <typename T, typename S = std::vector<T>>
0676 class stack
0677 {
0678 public:
0679
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
0692 stack(const stack&) = delete;
0693
0694 stack& operator=(const stack&) = delete;
0695 #endif
0696
0697
0698
0699
0700 const T& operator[](index_type i) const { return seq_[size_type(size() - 1 - i)]; }
0701
0702
0703
0704
0705 T& operator[](index_type i) { return seq_[size_type(size() - 1 - i)]; }
0706
0707
0708
0709
0710 void push(YY_MOVE_REF(T) t)
0711 {
0712 seq_.push_back(T());
0713 operator[](0).move(t);
0714 }
0715
0716
0717 void pop(std::ptrdiff_t n = 1) YY_NOEXCEPT
0718 {
0719 for (; 0 < n; --n)
0720 seq_.pop_back();
0721 }
0722
0723
0724 void clear() YY_NOEXCEPT { seq_.clear(); }
0725
0726
0727 index_type size() const YY_NOEXCEPT { return index_type(seq_.size()); }
0728
0729
0730 const_iterator begin() const YY_NOEXCEPT { return seq_.begin(); }
0731
0732
0733 const_iterator end() const YY_NOEXCEPT { return seq_.end(); }
0734
0735
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
0755 stack(const stack&);
0756
0757 stack& operator=(const stack&);
0758 #endif
0759
0760 S seq_;
0761 };
0762
0763
0764 typedef stack<stack_symbol_type> stack_type;
0765
0766
0767 stack_type yystack_;
0768
0769
0770
0771
0772
0773
0774 void yypush_(const char* m, YY_MOVE_REF(stack_symbol_type) sym);
0775
0776
0777
0778
0779
0780
0781
0782 void yypush_(const char* m, state_type s, YY_MOVE_REF(symbol_type) sym);
0783
0784
0785 void yypop_(int n = 1);
0786
0787
0788 enum
0789 {
0790 yylast_ = 82,
0791 yynnts_ = 27,
0792 yyfinal_ = 7
0793 };
0794
0795
0796 step::scanner* scanner;
0797 };
0798
0799 }
0800
0801
0802
0803
0804
0805 #if !defined(yyFlexLexer) && !defined(FlexLexerOnce)
0806 #define yyFlexLexer stepFlexLexer
0807 #include <FlexLexer.h>
0808 #endif
0809
0810 namespace step
0811 {
0812
0813
0814
0815
0816
0817
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 };
0832
0833
0834
0835 #endif