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
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 #ifndef YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED
0045 #define YY_EXPTOCAS_EXPTOCASEXE_EXPTOCAS_TAB_HXX_INCLUDED
0046
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
0083
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
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
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
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
0147 #if !defined lint || defined __GNUC__
0148 #define YYUSE(E) ((void)(E))
0149 #else
0150 #define YYUSE(E)
0151 #endif
0152
0153 #if defined __GNUC__ && !defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
0154
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)
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
0202 #ifndef YYDEBUG
0203 #define YYDEBUG 0
0204 #endif
0205
0206 namespace exptocas
0207 {
0208
0209
0210 class parser
0211 {
0212 public:
0213 #ifndef YYSTYPE
0214
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
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
0249 struct token
0250 {
0251 enum token_kind_type
0252 {
0253 YYEMPTY = -2,
0254 YYEOF = 0,
0255 YYerror = 256,
0256 YYUNDEF = 257,
0257 KSCHEM = 258,
0258 KENDS = 259,
0259 KTYP = 260,
0260 KENDT = 261,
0261 KENT = 262,
0262 KENDE = 263,
0263 KREF = 264,
0264 KFROM = 265,
0265 KSEL = 266,
0266 KENUM = 267,
0267 KLIST = 268,
0268 KARR = 269,
0269 KBAG = 270,
0270 KSET = 271,
0271 KOF = 272,
0272 KNUM = 273,
0273 KINT = 274,
0274 KDBL = 275,
0275 KSTR = 276,
0276 KLOG = 277,
0277 KBOOL = 278,
0278 KOPT = 279,
0279 KUNIQ = 280,
0280 KSELF = 281,
0281 KABSTR = 282,
0282 KSUBT = 283,
0283 KSPRT = 284,
0284 KANDOR = 285,
0285 K1OF = 286,
0286 KAND = 287,
0287 NUMBER = 288,
0288 NAME = 289
0289 };
0290
0291
0292 typedef token_kind_type yytokentype;
0293 };
0294
0295
0296 typedef token::yytokentype token_kind_type;
0297
0298
0299 typedef token_kind_type token_type;
0300
0301
0302 struct symbol_kind
0303 {
0304 enum symbol_kind_type
0305 {
0306 YYNTOKENS = 46,
0307 S_YYEMPTY = -2,
0308 S_YYEOF = 0,
0309 S_YYerror = 1,
0310 S_YYUNDEF = 2,
0311 S_KSCHEM = 3,
0312 S_KENDS = 4,
0313 S_KTYP = 5,
0314 S_KENDT = 6,
0315 S_KENT = 7,
0316 S_KENDE = 8,
0317 S_KREF = 9,
0318 S_KFROM = 10,
0319 S_KSEL = 11,
0320 S_KENUM = 12,
0321 S_KLIST = 13,
0322 S_KARR = 14,
0323 S_KBAG = 15,
0324 S_KSET = 16,
0325 S_KOF = 17,
0326 S_KNUM = 18,
0327 S_KINT = 19,
0328 S_KDBL = 20,
0329 S_KSTR = 21,
0330 S_KLOG = 22,
0331 S_KBOOL = 23,
0332 S_KOPT = 24,
0333 S_KUNIQ = 25,
0334 S_KSELF = 26,
0335 S_KABSTR = 27,
0336 S_KSUBT = 28,
0337 S_KSPRT = 29,
0338 S_KANDOR = 30,
0339 S_K1OF = 31,
0340 S_KAND = 32,
0341 S_NUMBER = 33,
0342 S_NAME = 34,
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,
0355 S_SCHEMA = 47,
0356 S_ILIST = 48,
0357 S_ITEM = 49,
0358 S_ENUM = 50,
0359 S_SELECT = 51,
0360 S_ALIAS = 52,
0361 S_ENTITY = 53,
0362 S_REFERENCE = 54,
0363 S_TLIST = 55,
0364 S_TLIST1 = 56,
0365 S_TYPE = 57,
0366 S_TSTD = 58,
0367 S_TNAME = 59,
0368 S_TSET = 60,
0369 S_INDEX = 61,
0370 S_OPTUNI = 62,
0371 S_SUBT = 63,
0372 S_SUPERT = 64,
0373 S_SUPLST = 65,
0374 S_FLIST = 66,
0375 S_FLIST1 = 67,
0376 S_FIELD = 68,
0377 S_REDEF = 69,
0378 S_SPECIF = 70,
0379 S_OPTNL = 71,
0380 S_UNIQIT = 72,
0381 S_UNIQLS = 73,
0382 S_UNIQUE = 74,
0383 S_SPCLST = 75
0384 };
0385 };
0386
0387
0388 typedef symbol_kind::symbol_kind_type symbol_kind_type;
0389
0390
0391 static const symbol_kind_type YYNTOKENS = symbol_kind::YYNTOKENS;
0392
0393
0394
0395
0396
0397
0398
0399 template <typename Base>
0400 struct basic_symbol : Base
0401 {
0402
0403 typedef Base super_type;
0404
0405
0406 basic_symbol()
0407 : value()
0408 {
0409 }
0410
0411 #if 201103L <= YY_CPLUSPLUS
0412
0413 basic_symbol(basic_symbol&& that)
0414 : Base(std::move(that)),
0415 value(std::move(that.value))
0416 {
0417 }
0418 #endif
0419
0420
0421 basic_symbol(const basic_symbol& that);
0422
0423 basic_symbol(typename Base::kind_type t);
0424
0425
0426 basic_symbol(typename Base::kind_type t, YY_RVREF(semantic_type) v);
0427
0428
0429 ~basic_symbol() { clear(); }
0430
0431
0432 void clear() { Base::clear(); }
0433
0434 #if YYDEBUG || 0
0435
0436 const char* name() const YY_NOEXCEPT { return parser::symbol_name(this->kind()); }
0437 #endif
0438
0439
0440 symbol_kind_type type_get() const YY_NOEXCEPT;
0441
0442
0443 bool empty() const YY_NOEXCEPT;
0444
0445
0446 void move(basic_symbol& s);
0447
0448
0449 semantic_type value;
0450
0451 private:
0452 #if YY_CPLUSPLUS < 201103L
0453
0454 basic_symbol& operator=(const basic_symbol& that);
0455 #endif
0456 };
0457
0458
0459 struct by_kind
0460 {
0461
0462 by_kind();
0463
0464 #if 201103L <= YY_CPLUSPLUS
0465
0466 by_kind(by_kind&& that);
0467 #endif
0468
0469
0470 by_kind(const by_kind& that);
0471
0472
0473 typedef token_kind_type kind_type;
0474
0475
0476 by_kind(kind_type t);
0477
0478
0479 void clear();
0480
0481
0482 void move(by_kind& that);
0483
0484
0485
0486 symbol_kind_type kind() const YY_NOEXCEPT;
0487
0488
0489 symbol_kind_type type_get() const YY_NOEXCEPT;
0490
0491
0492
0493 symbol_kind_type kind_;
0494 };
0495
0496
0497 typedef by_kind by_type;
0498
0499
0500 struct symbol_type : basic_symbol<by_kind>
0501 {
0502 };
0503
0504
0505 parser(exptocas::scanner* scanner_yyarg);
0506 virtual ~parser();
0507
0508 #if 201103L <= YY_CPLUSPLUS
0509
0510 parser(const parser&) = delete;
0511
0512 parser& operator=(const parser&) = delete;
0513 #endif
0514
0515
0516
0517 int operator()();
0518
0519
0520
0521 virtual int parse();
0522
0523 #if YYDEBUG
0524
0525 std::ostream& debug_stream() const YY_ATTRIBUTE_PURE;
0526
0527 void set_debug_stream(std::ostream&);
0528
0529
0530 typedef int debug_level_type;
0531
0532 debug_level_type debug_level() const YY_ATTRIBUTE_PURE;
0533
0534 void set_debug_level(debug_level_type l);
0535 #endif
0536
0537
0538
0539 virtual void error(const std::string& msg);
0540
0541
0542 void error(const syntax_error& err);
0543
0544 #if YYDEBUG || 0
0545
0546
0547 static const char* symbol_name(symbol_kind_type yysymbol);
0548 #endif
0549
0550 private:
0551 #if YY_CPLUSPLUS < 201103L
0552
0553 parser(const parser&);
0554
0555 parser& operator=(const parser&);
0556 #endif
0557
0558
0559 typedef unsigned char state_type;
0560
0561
0562
0563
0564 static state_type yy_lr_goto_state_(state_type yystate, int yysym);
0565
0566
0567
0568 static bool yy_pact_value_is_default_(int yyvalue);
0569
0570
0571
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
0578
0579
0580 static symbol_kind_type yytranslate_(int t);
0581
0582 #if YYDEBUG || 0
0583
0584 static const char* const yytname_[];
0585 #endif
0586
0587
0588
0589
0590 static const short yypact_[];
0591
0592
0593
0594
0595 static const signed char yydefact_[];
0596
0597
0598 static const short yypgoto_[];
0599
0600
0601 static const short yydefgoto_[];
0602
0603
0604
0605
0606 static const unsigned char yytable_[];
0607
0608 static const short yycheck_[];
0609
0610
0611
0612 static const signed char yystos_[];
0613
0614
0615 static const signed char yyr1_[];
0616
0617
0618 static const signed char yyr2_[];
0619
0620 #if YYDEBUG
0621
0622 static const short yyrline_[];
0623
0624 virtual void yy_reduce_print_(int r) const;
0625
0626 virtual void yy_stack_print_() const;
0627
0628
0629 int yydebug_;
0630
0631 std::ostream* yycdebug_;
0632
0633
0634
0635
0636 template <typename Base>
0637 void yy_print_(std::ostream& yyo, const basic_symbol<Base>& yysym) const;
0638 #endif
0639
0640
0641
0642
0643
0644 template <typename Base>
0645 void yy_destroy_(const char* yymsg, basic_symbol<Base>& yysym) const;
0646
0647 private:
0648
0649 struct by_state
0650 {
0651
0652 by_state() YY_NOEXCEPT;
0653
0654
0655 typedef state_type kind_type;
0656
0657
0658 by_state(kind_type s) YY_NOEXCEPT;
0659
0660
0661 by_state(const by_state& that) YY_NOEXCEPT;
0662
0663
0664 void clear() YY_NOEXCEPT;
0665
0666
0667 void move(by_state& that);
0668
0669
0670
0671 symbol_kind_type kind() const YY_NOEXCEPT;
0672
0673
0674
0675 enum
0676 {
0677 empty_state = 0
0678 };
0679
0680
0681
0682 state_type state;
0683 };
0684
0685
0686 struct stack_symbol_type : basic_symbol<by_state>
0687 {
0688
0689 typedef basic_symbol<by_state> super_type;
0690
0691 stack_symbol_type();
0692
0693 stack_symbol_type(YY_RVREF(stack_symbol_type) that);
0694
0695 stack_symbol_type(state_type s, YY_MOVE_REF(symbol_type) sym);
0696 #if YY_CPLUSPLUS < 201103L
0697
0698
0699 stack_symbol_type& operator=(stack_symbol_type& that);
0700
0701
0702
0703 stack_symbol_type& operator=(const stack_symbol_type& that);
0704 #endif
0705 };
0706
0707
0708 template <typename T, typename S = std::vector<T>>
0709 class stack
0710 {
0711 public:
0712
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
0725 stack(const stack&) = delete;
0726
0727 stack& operator=(const stack&) = delete;
0728 #endif
0729
0730
0731
0732
0733 const T& operator[](index_type i) const { return seq_[size_type(size() - 1 - i)]; }
0734
0735
0736
0737
0738 T& operator[](index_type i) { return seq_[size_type(size() - 1 - i)]; }
0739
0740
0741
0742
0743 void push(YY_MOVE_REF(T) t)
0744 {
0745 seq_.push_back(T());
0746 operator[](0).move(t);
0747 }
0748
0749
0750 void pop(std::ptrdiff_t n = 1) YY_NOEXCEPT
0751 {
0752 for (; 0 < n; --n)
0753 seq_.pop_back();
0754 }
0755
0756
0757 void clear() YY_NOEXCEPT { seq_.clear(); }
0758
0759
0760 index_type size() const YY_NOEXCEPT { return index_type(seq_.size()); }
0761
0762
0763 const_iterator begin() const YY_NOEXCEPT { return seq_.begin(); }
0764
0765
0766 const_iterator end() const YY_NOEXCEPT { return seq_.end(); }
0767
0768
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
0788 stack(const stack&);
0789
0790 stack& operator=(const stack&);
0791 #endif
0792
0793 S seq_;
0794 };
0795
0796
0797 typedef stack<stack_symbol_type> stack_type;
0798
0799
0800 stack_type yystack_;
0801
0802
0803
0804
0805
0806
0807 void yypush_(const char* m, YY_MOVE_REF(stack_symbol_type) sym);
0808
0809
0810
0811
0812
0813
0814
0815 void yypush_(const char* m, state_type s, YY_MOVE_REF(symbol_type) sym);
0816
0817
0818 void yypop_(int n = 1);
0819
0820
0821 enum
0822 {
0823 yylast_ = 164,
0824 yynnts_ = 30,
0825 yyfinal_ = 4
0826 };
0827
0828
0829 exptocas::scanner* scanner;
0830 };
0831
0832 }
0833
0834
0835
0836 #if !defined(yyFlexLexer) && !defined(FlexLexerOnce)
0837 #define yyFlexLexer exptocasFlexLexer
0838 #include "FlexLexer.h"
0839 #endif
0840 namespace exptocas
0841 {
0842
0843
0844
0845
0846
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 };
0855
0856 #endif