r21430: Support tagged types without typedef. This means:
[Samba/ekacnet.git] / source / pidl / lib / Parse / Pidl / IDL.pm
blobe547b2caa8a5407f2aa0fc700b4785891f63cd2a
1 ####################################################################
3 # This file was generated using Parse::Yapp version 1.05.
5 # Don't edit this file, use source file instead.
7 # ANY CHANGE MADE HERE WILL BE LOST !
9 ####################################################################
10 package Parse::Pidl::IDL;
11 use vars qw ( @ISA );
12 use strict;
14 @ISA= qw ( Parse::Yapp::Driver );
15 use Parse::Yapp::Driver;
19 sub new {
20 my($class)=shift;
21 ref($class)
22 and $class=ref($class);
24 my($self)=$class->SUPER::new( yyversion => '1.05',
25 yystates =>
27 {#State 0
28 DEFAULT => -1,
29 GOTOS => {
30 'idl' => 1
33 {#State 1
34 ACTIONS => {
35 '' => 2,
36 "importlib" => 3,
37 "import" => 6,
38 "include" => 11
40 DEFAULT => -91,
41 GOTOS => {
42 'importlib' => 9,
43 'interface' => 8,
44 'include' => 4,
45 'coclass' => 10,
46 'import' => 7,
47 'property_list' => 5
50 {#State 2
51 DEFAULT => 0
53 {#State 3
54 ACTIONS => {
55 'TEXT' => 13
57 GOTOS => {
58 'commalist' => 12,
59 'text' => 14
62 {#State 4
63 DEFAULT => -5
65 {#State 5
66 ACTIONS => {
67 "coclass" => 15,
68 "[" => 17,
69 "interface" => 16
72 {#State 6
73 ACTIONS => {
74 'TEXT' => 13
76 GOTOS => {
77 'commalist' => 18,
78 'text' => 14
81 {#State 7
82 DEFAULT => -4
84 {#State 8
85 DEFAULT => -2
87 {#State 9
88 DEFAULT => -6
90 {#State 10
91 DEFAULT => -3
93 {#State 11
94 ACTIONS => {
95 'TEXT' => 13
97 GOTOS => {
98 'commalist' => 19,
99 'text' => 14
102 {#State 12
103 ACTIONS => {
104 ";" => 20,
105 "," => 21
108 {#State 13
109 DEFAULT => -124
111 {#State 14
112 DEFAULT => -10
114 {#State 15
115 ACTIONS => {
116 'IDENTIFIER' => 22
118 GOTOS => {
119 'identifier' => 23
122 {#State 16
123 ACTIONS => {
124 'IDENTIFIER' => 22
126 GOTOS => {
127 'identifier' => 24
130 {#State 17
131 ACTIONS => {
132 'IDENTIFIER' => 22
134 GOTOS => {
135 'identifier' => 26,
136 'property' => 27,
137 'properties' => 25
140 {#State 18
141 ACTIONS => {
142 ";" => 28,
143 "," => 21
146 {#State 19
147 ACTIONS => {
148 ";" => 29,
149 "," => 21
152 {#State 20
153 DEFAULT => -9
155 {#State 21
156 ACTIONS => {
157 'TEXT' => 13
159 GOTOS => {
160 'text' => 30
163 {#State 22
164 DEFAULT => -120
166 {#State 23
167 ACTIONS => {
168 "{" => 31
171 {#State 24
172 ACTIONS => {
173 ":" => 32
175 DEFAULT => -16,
176 GOTOS => {
177 'base_interface' => 33
180 {#State 25
181 ACTIONS => {
182 "," => 34,
183 "]" => 35
186 {#State 26
187 ACTIONS => {
188 "(" => 36
190 DEFAULT => -95
192 {#State 27
193 DEFAULT => -93
195 {#State 28
196 DEFAULT => -7
198 {#State 29
199 DEFAULT => -8
201 {#State 30
202 DEFAULT => -11
204 {#State 31
205 DEFAULT => -13,
206 GOTOS => {
207 'interface_names' => 37
210 {#State 32
211 ACTIONS => {
212 'IDENTIFIER' => 22
214 GOTOS => {
215 'identifier' => 38
218 {#State 33
219 ACTIONS => {
220 "{" => 39
223 {#State 34
224 ACTIONS => {
225 'IDENTIFIER' => 22
227 GOTOS => {
228 'identifier' => 26,
229 'property' => 40
232 {#State 35
233 DEFAULT => -92
235 {#State 36
236 ACTIONS => {
237 'CONSTANT' => 44,
238 'TEXT' => 13,
239 'IDENTIFIER' => 22
241 DEFAULT => -101,
242 GOTOS => {
243 'identifier' => 45,
244 'text' => 46,
245 'listtext' => 42,
246 'anytext' => 41,
247 'constant' => 43
250 {#State 37
251 ACTIONS => {
252 "}" => 47,
253 "interface" => 48
256 {#State 38
257 DEFAULT => -17
259 {#State 39
260 ACTIONS => {
261 "declare" => 56,
262 "const" => 60
264 DEFAULT => -91,
265 GOTOS => {
266 'typedecl' => 49,
267 'function' => 50,
268 'definitions' => 52,
269 'bitmap' => 51,
270 'definition' => 55,
271 'property_list' => 54,
272 'usertype' => 53,
273 'const' => 59,
274 'declare' => 58,
275 'struct' => 57,
276 'typedef' => 62,
277 'enum' => 61,
278 'union' => 63
281 {#State 40
282 DEFAULT => -94
284 {#State 41
285 ACTIONS => {
286 "-" => 65,
287 ":" => 64,
288 "<" => 67,
289 "+" => 69,
290 "~" => 68,
291 "*" => 76,
292 "?" => 66,
293 "{" => 70,
294 "&" => 71,
295 "/" => 72,
296 "=" => 73,
297 "(" => 74,
298 "|" => 75,
299 "." => 77,
300 ">" => 78
302 DEFAULT => -97
304 {#State 42
305 ACTIONS => {
306 "," => 79,
307 ")" => 80
310 {#State 43
311 DEFAULT => -103
313 {#State 44
314 DEFAULT => -123
316 {#State 45
317 DEFAULT => -102
319 {#State 46
320 DEFAULT => -104
322 {#State 47
323 ACTIONS => {
324 ";" => 82
326 DEFAULT => -125,
327 GOTOS => {
328 'optional_semicolon' => 81
331 {#State 48
332 ACTIONS => {
333 'IDENTIFIER' => 22
335 GOTOS => {
336 'identifier' => 83
339 {#State 49
340 DEFAULT => -24
342 {#State 50
343 DEFAULT => -20
345 {#State 51
346 DEFAULT => -39
348 {#State 52
349 ACTIONS => {
350 "}" => 84,
351 "declare" => 56,
352 "const" => 60
354 DEFAULT => -91,
355 GOTOS => {
356 'typedecl' => 49,
357 'function' => 50,
358 'bitmap' => 51,
359 'definition' => 85,
360 'property_list' => 54,
361 'usertype' => 53,
362 'const' => 59,
363 'struct' => 57,
364 'declare' => 58,
365 'typedef' => 62,
366 'enum' => 61,
367 'union' => 63
370 {#State 53
371 ACTIONS => {
372 ";" => 86
375 {#State 54
376 ACTIONS => {
377 "typedef" => 87,
378 'IDENTIFIER' => 22,
379 "signed" => 95,
380 "union" => 88,
381 "enum" => 97,
382 "bitmap" => 98,
383 'void' => 89,
384 "unsigned" => 99,
385 "[" => 17,
386 "struct" => 94
388 GOTOS => {
389 'existingtype' => 96,
390 'bitmap' => 51,
391 'usertype' => 91,
392 'property_list' => 90,
393 'identifier' => 92,
394 'struct' => 57,
395 'enum' => 61,
396 'type' => 100,
397 'union' => 63,
398 'sign' => 93
401 {#State 55
402 DEFAULT => -18
404 {#State 56
405 DEFAULT => -91,
406 GOTOS => {
407 'property_list' => 101
410 {#State 57
411 DEFAULT => -36
413 {#State 58
414 DEFAULT => -23
416 {#State 59
417 DEFAULT => -21
419 {#State 60
420 ACTIONS => {
421 'IDENTIFIER' => 22
423 GOTOS => {
424 'identifier' => 102
427 {#State 61
428 DEFAULT => -38
430 {#State 62
431 DEFAULT => -22
433 {#State 63
434 DEFAULT => -37
436 {#State 64
437 ACTIONS => {
438 'CONSTANT' => 44,
439 'TEXT' => 13,
440 'IDENTIFIER' => 22
442 DEFAULT => -101,
443 GOTOS => {
444 'identifier' => 45,
445 'anytext' => 103,
446 'text' => 46,
447 'constant' => 43
450 {#State 65
451 ACTIONS => {
452 'CONSTANT' => 44,
453 'TEXT' => 13,
454 'IDENTIFIER' => 22
456 DEFAULT => -101,
457 GOTOS => {
458 'identifier' => 45,
459 'anytext' => 104,
460 'text' => 46,
461 'constant' => 43
464 {#State 66
465 ACTIONS => {
466 'CONSTANT' => 44,
467 'TEXT' => 13,
468 'IDENTIFIER' => 22
470 DEFAULT => -101,
471 GOTOS => {
472 'identifier' => 45,
473 'anytext' => 105,
474 'text' => 46,
475 'constant' => 43
478 {#State 67
479 ACTIONS => {
480 'CONSTANT' => 44,
481 'TEXT' => 13,
482 'IDENTIFIER' => 22
484 DEFAULT => -101,
485 GOTOS => {
486 'identifier' => 45,
487 'anytext' => 106,
488 'text' => 46,
489 'constant' => 43
492 {#State 68
493 ACTIONS => {
494 'CONSTANT' => 44,
495 'TEXT' => 13,
496 'IDENTIFIER' => 22
498 DEFAULT => -101,
499 GOTOS => {
500 'identifier' => 45,
501 'anytext' => 107,
502 'text' => 46,
503 'constant' => 43
506 {#State 69
507 ACTIONS => {
508 'CONSTANT' => 44,
509 'TEXT' => 13,
510 'IDENTIFIER' => 22
512 DEFAULT => -101,
513 GOTOS => {
514 'identifier' => 45,
515 'anytext' => 108,
516 'text' => 46,
517 'constant' => 43
520 {#State 70
521 ACTIONS => {
522 'CONSTANT' => 44,
523 'TEXT' => 13,
524 'IDENTIFIER' => 22
526 DEFAULT => -101,
527 GOTOS => {
528 'identifier' => 45,
529 'anytext' => 109,
530 'text' => 46,
531 'constant' => 43,
532 'commalisttext' => 110
535 {#State 71
536 ACTIONS => {
537 'CONSTANT' => 44,
538 'TEXT' => 13,
539 'IDENTIFIER' => 22
541 DEFAULT => -101,
542 GOTOS => {
543 'identifier' => 45,
544 'anytext' => 111,
545 'text' => 46,
546 'constant' => 43
549 {#State 72
550 ACTIONS => {
551 'CONSTANT' => 44,
552 'TEXT' => 13,
553 'IDENTIFIER' => 22
555 DEFAULT => -101,
556 GOTOS => {
557 'identifier' => 45,
558 'anytext' => 112,
559 'text' => 46,
560 'constant' => 43
563 {#State 73
564 ACTIONS => {
565 'CONSTANT' => 44,
566 'TEXT' => 13,
567 'IDENTIFIER' => 22
569 DEFAULT => -101,
570 GOTOS => {
571 'identifier' => 45,
572 'anytext' => 113,
573 'text' => 46,
574 'constant' => 43
577 {#State 74
578 ACTIONS => {
579 'CONSTANT' => 44,
580 'TEXT' => 13,
581 'IDENTIFIER' => 22
583 DEFAULT => -101,
584 GOTOS => {
585 'identifier' => 45,
586 'anytext' => 109,
587 'text' => 46,
588 'constant' => 43,
589 'commalisttext' => 114
592 {#State 75
593 ACTIONS => {
594 'CONSTANT' => 44,
595 'TEXT' => 13,
596 'IDENTIFIER' => 22
598 DEFAULT => -101,
599 GOTOS => {
600 'identifier' => 45,
601 'anytext' => 115,
602 'text' => 46,
603 'constant' => 43
606 {#State 76
607 ACTIONS => {
608 'CONSTANT' => 44,
609 'TEXT' => 13,
610 'IDENTIFIER' => 22
612 DEFAULT => -101,
613 GOTOS => {
614 'identifier' => 45,
615 'anytext' => 116,
616 'text' => 46,
617 'constant' => 43
620 {#State 77
621 ACTIONS => {
622 'CONSTANT' => 44,
623 'TEXT' => 13,
624 'IDENTIFIER' => 22
626 DEFAULT => -101,
627 GOTOS => {
628 'identifier' => 45,
629 'anytext' => 117,
630 'text' => 46,
631 'constant' => 43
634 {#State 78
635 ACTIONS => {
636 'CONSTANT' => 44,
637 'TEXT' => 13,
638 'IDENTIFIER' => 22
640 DEFAULT => -101,
641 GOTOS => {
642 'identifier' => 45,
643 'anytext' => 118,
644 'text' => 46,
645 'constant' => 43
648 {#State 79
649 ACTIONS => {
650 'CONSTANT' => 44,
651 'TEXT' => 13,
652 'IDENTIFIER' => 22
654 DEFAULT => -101,
655 GOTOS => {
656 'identifier' => 45,
657 'anytext' => 119,
658 'text' => 46,
659 'constant' => 43
662 {#State 80
663 DEFAULT => -96
665 {#State 81
666 DEFAULT => -12
668 {#State 82
669 DEFAULT => -126
671 {#State 83
672 ACTIONS => {
673 ";" => 120
676 {#State 84
677 ACTIONS => {
678 ";" => 82
680 DEFAULT => -125,
681 GOTOS => {
682 'optional_semicolon' => 121
685 {#State 85
686 DEFAULT => -19
688 {#State 86
689 DEFAULT => -40
691 {#State 87
692 ACTIONS => {
693 'IDENTIFIER' => 22,
694 "signed" => 95,
695 'void' => 89,
696 "unsigned" => 99
698 DEFAULT => -91,
699 GOTOS => {
700 'existingtype' => 96,
701 'bitmap' => 51,
702 'usertype' => 91,
703 'property_list' => 90,
704 'identifier' => 92,
705 'struct' => 57,
706 'enum' => 61,
707 'type' => 122,
708 'union' => 63,
709 'sign' => 93
712 {#State 88
713 ACTIONS => {
714 'IDENTIFIER' => 123
716 DEFAULT => -122,
717 GOTOS => {
718 'optional_identifier' => 124
721 {#State 89
722 DEFAULT => -47
724 {#State 90
725 ACTIONS => {
726 "union" => 88,
727 "enum" => 97,
728 "bitmap" => 98,
729 "[" => 17,
730 "struct" => 94
733 {#State 91
734 DEFAULT => -45
736 {#State 92
737 DEFAULT => -44
739 {#State 93
740 ACTIONS => {
741 'IDENTIFIER' => 22
743 GOTOS => {
744 'identifier' => 125
747 {#State 94
748 ACTIONS => {
749 'IDENTIFIER' => 123
751 DEFAULT => -122,
752 GOTOS => {
753 'optional_identifier' => 126
756 {#State 95
757 DEFAULT => -41
759 {#State 96
760 DEFAULT => -46
762 {#State 97
763 ACTIONS => {
764 'IDENTIFIER' => 123
766 DEFAULT => -122,
767 GOTOS => {
768 'optional_identifier' => 127
771 {#State 98
772 ACTIONS => {
773 'IDENTIFIER' => 123
775 DEFAULT => -122,
776 GOTOS => {
777 'optional_identifier' => 128
780 {#State 99
781 DEFAULT => -42
783 {#State 100
784 ACTIONS => {
785 'IDENTIFIER' => 22
787 GOTOS => {
788 'identifier' => 129
791 {#State 101
792 ACTIONS => {
793 "union" => 130,
794 "enum" => 135,
795 "bitmap" => 136,
796 "[" => 17
798 GOTOS => {
799 'decl_enum' => 131,
800 'decl_bitmap' => 132,
801 'decl_type' => 134,
802 'decl_union' => 133
805 {#State 102
806 DEFAULT => -80,
807 GOTOS => {
808 'pointers' => 137
811 {#State 103
812 ACTIONS => {
813 "-" => 65,
814 ":" => 64,
815 "<" => 67,
816 "+" => 69,
817 "~" => 68,
818 "*" => 76,
819 "?" => 66,
820 "{" => 70,
821 "&" => 71,
822 "/" => 72,
823 "=" => 73,
824 "(" => 74,
825 "|" => 75,
826 "." => 77,
827 ">" => 78
829 DEFAULT => -114
831 {#State 104
832 ACTIONS => {
833 ":" => 64,
834 "<" => 67,
835 "~" => 68,
836 "?" => 66,
837 "{" => 70,
838 "=" => 73
840 DEFAULT => -105
842 {#State 105
843 ACTIONS => {
844 "-" => 65,
845 ":" => 64,
846 "<" => 67,
847 "+" => 69,
848 "~" => 68,
849 "*" => 76,
850 "?" => 66,
851 "{" => 70,
852 "&" => 71,
853 "/" => 72,
854 "=" => 73,
855 "(" => 74,
856 "|" => 75,
857 "." => 77,
858 ">" => 78
860 DEFAULT => -113
862 {#State 106
863 ACTIONS => {
864 "-" => 65,
865 ":" => 64,
866 "<" => 67,
867 "+" => 69,
868 "~" => 68,
869 "*" => 76,
870 "?" => 66,
871 "{" => 70,
872 "&" => 71,
873 "/" => 72,
874 "=" => 73,
875 "(" => 74,
876 "|" => 75,
877 "." => 77,
878 ">" => 78
880 DEFAULT => -109
882 {#State 107
883 ACTIONS => {
884 "-" => 65,
885 ":" => 64,
886 "<" => 67,
887 "+" => 69,
888 "~" => 68,
889 "*" => 76,
890 "?" => 66,
891 "{" => 70,
892 "&" => 71,
893 "/" => 72,
894 "=" => 73,
895 "(" => 74,
896 "|" => 75,
897 "." => 77,
898 ">" => 78
900 DEFAULT => -117
902 {#State 108
903 ACTIONS => {
904 ":" => 64,
905 "<" => 67,
906 "~" => 68,
907 "?" => 66,
908 "{" => 70,
909 "=" => 73
911 DEFAULT => -116
913 {#State 109
914 ACTIONS => {
915 "-" => 65,
916 ":" => 64,
917 "<" => 67,
918 "+" => 69,
919 "~" => 68,
920 "*" => 76,
921 "?" => 66,
922 "{" => 70,
923 "&" => 71,
924 "/" => 72,
925 "=" => 73,
926 "(" => 74,
927 "|" => 75,
928 "." => 77,
929 ">" => 78
931 DEFAULT => -99
933 {#State 110
934 ACTIONS => {
935 "}" => 138,
936 "," => 139
939 {#State 111
940 ACTIONS => {
941 ":" => 64,
942 "<" => 67,
943 "~" => 68,
944 "?" => 66,
945 "{" => 70,
946 "=" => 73
948 DEFAULT => -111
950 {#State 112
951 ACTIONS => {
952 ":" => 64,
953 "<" => 67,
954 "~" => 68,
955 "?" => 66,
956 "{" => 70,
957 "=" => 73
959 DEFAULT => -112
961 {#State 113
962 ACTIONS => {
963 "-" => 65,
964 ":" => 64,
965 "<" => 67,
966 "+" => 69,
967 "~" => 68,
968 "*" => 76,
969 "?" => 66,
970 "{" => 70,
971 "&" => 71,
972 "/" => 72,
973 "=" => 73,
974 "(" => 74,
975 "|" => 75,
976 "." => 77,
977 ">" => 78
979 DEFAULT => -115
981 {#State 114
982 ACTIONS => {
983 "," => 139,
984 ")" => 140
987 {#State 115
988 ACTIONS => {
989 ":" => 64,
990 "<" => 67,
991 "~" => 68,
992 "?" => 66,
993 "{" => 70,
994 "=" => 73
996 DEFAULT => -110
998 {#State 116
999 ACTIONS => {
1000 ":" => 64,
1001 "<" => 67,
1002 "~" => 68,
1003 "?" => 66,
1004 "{" => 70,
1005 "=" => 73
1007 DEFAULT => -107
1009 {#State 117
1010 ACTIONS => {
1011 ":" => 64,
1012 "<" => 67,
1013 "~" => 68,
1014 "?" => 66,
1015 "{" => 70,
1016 "=" => 73
1018 DEFAULT => -106
1020 {#State 118
1021 ACTIONS => {
1022 ":" => 64,
1023 "<" => 67,
1024 "~" => 68,
1025 "?" => 66,
1026 "{" => 70,
1027 "=" => 73
1029 DEFAULT => -108
1031 {#State 119
1032 ACTIONS => {
1033 "-" => 65,
1034 ":" => 64,
1035 "<" => 67,
1036 "+" => 69,
1037 "~" => 68,
1038 "*" => 76,
1039 "?" => 66,
1040 "{" => 70,
1041 "&" => 71,
1042 "/" => 72,
1043 "=" => 73,
1044 "(" => 74,
1045 "|" => 75,
1046 "." => 77,
1047 ">" => 78
1049 DEFAULT => -98
1051 {#State 120
1052 DEFAULT => -14
1054 {#State 121
1055 DEFAULT => -15
1057 {#State 122
1058 ACTIONS => {
1059 'IDENTIFIER' => 22
1061 GOTOS => {
1062 'identifier' => 141
1065 {#State 123
1066 DEFAULT => -121
1068 {#State 124
1069 ACTIONS => {
1070 "{" => 143
1072 DEFAULT => -76,
1073 GOTOS => {
1074 'union_body' => 144,
1075 'opt_union_body' => 142
1078 {#State 125
1079 DEFAULT => -43
1081 {#State 126
1082 ACTIONS => {
1083 "{" => 146
1085 DEFAULT => -66,
1086 GOTOS => {
1087 'struct_body' => 145,
1088 'opt_struct_body' => 147
1091 {#State 127
1092 ACTIONS => {
1093 "{" => 148
1095 DEFAULT => -49,
1096 GOTOS => {
1097 'opt_enum_body' => 150,
1098 'enum_body' => 149
1101 {#State 128
1102 ACTIONS => {
1103 "{" => 152
1105 DEFAULT => -57,
1106 GOTOS => {
1107 'bitmap_body' => 153,
1108 'opt_bitmap_body' => 151
1111 {#State 129
1112 ACTIONS => {
1113 "(" => 154
1116 {#State 130
1117 DEFAULT => -34
1119 {#State 131
1120 DEFAULT => -29
1122 {#State 132
1123 DEFAULT => -30
1125 {#State 133
1126 DEFAULT => -31
1128 {#State 134
1129 ACTIONS => {
1130 'IDENTIFIER' => 22
1132 GOTOS => {
1133 'identifier' => 155
1136 {#State 135
1137 DEFAULT => -32
1139 {#State 136
1140 DEFAULT => -33
1142 {#State 137
1143 ACTIONS => {
1144 'IDENTIFIER' => 22,
1145 "*" => 157
1147 GOTOS => {
1148 'identifier' => 156
1151 {#State 138
1152 ACTIONS => {
1153 'CONSTANT' => 44,
1154 'TEXT' => 13,
1155 'IDENTIFIER' => 22
1157 DEFAULT => -101,
1158 GOTOS => {
1159 'identifier' => 45,
1160 'anytext' => 158,
1161 'text' => 46,
1162 'constant' => 43
1165 {#State 139
1166 ACTIONS => {
1167 'CONSTANT' => 44,
1168 'TEXT' => 13,
1169 'IDENTIFIER' => 22
1171 DEFAULT => -101,
1172 GOTOS => {
1173 'identifier' => 45,
1174 'anytext' => 159,
1175 'text' => 46,
1176 'constant' => 43
1179 {#State 140
1180 ACTIONS => {
1181 'CONSTANT' => 44,
1182 'TEXT' => 13,
1183 'IDENTIFIER' => 22
1185 DEFAULT => -101,
1186 GOTOS => {
1187 'identifier' => 45,
1188 'anytext' => 160,
1189 'text' => 46,
1190 'constant' => 43
1193 {#State 141
1194 ACTIONS => {
1195 "[" => 161
1197 DEFAULT => -88,
1198 GOTOS => {
1199 'array_len' => 162
1202 {#State 142
1203 DEFAULT => -78
1205 {#State 143
1206 DEFAULT => -73,
1207 GOTOS => {
1208 'union_elements' => 163
1211 {#State 144
1212 DEFAULT => -77
1214 {#State 145
1215 DEFAULT => -67
1217 {#State 146
1218 DEFAULT => -82,
1219 GOTOS => {
1220 'element_list1' => 164
1223 {#State 147
1224 DEFAULT => -68
1226 {#State 148
1227 ACTIONS => {
1228 'IDENTIFIER' => 22
1230 GOTOS => {
1231 'identifier' => 165,
1232 'enum_element' => 166,
1233 'enum_elements' => 167
1236 {#State 149
1237 DEFAULT => -50
1239 {#State 150
1240 DEFAULT => -51
1242 {#State 151
1243 DEFAULT => -59
1245 {#State 152
1246 ACTIONS => {
1247 'IDENTIFIER' => 22
1249 DEFAULT => -62,
1250 GOTOS => {
1251 'identifier' => 170,
1252 'bitmap_element' => 169,
1253 'bitmap_elements' => 168,
1254 'opt_bitmap_elements' => 171
1257 {#State 153
1258 DEFAULT => -58
1260 {#State 154
1261 ACTIONS => {
1262 "," => -84,
1263 "void" => 175,
1264 ")" => -84
1266 DEFAULT => -91,
1267 GOTOS => {
1268 'base_element' => 172,
1269 'element_list2' => 174,
1270 'property_list' => 173
1273 {#State 155
1274 ACTIONS => {
1275 ";" => 176
1278 {#State 156
1279 ACTIONS => {
1280 "[" => 161,
1281 "=" => 178
1283 GOTOS => {
1284 'array_len' => 177
1287 {#State 157
1288 DEFAULT => -81
1290 {#State 158
1291 ACTIONS => {
1292 "-" => 65,
1293 ":" => 64,
1294 "<" => 67,
1295 "+" => 69,
1296 "~" => 68,
1297 "*" => 76,
1298 "?" => 66,
1299 "{" => 70,
1300 "&" => 71,
1301 "/" => 72,
1302 "=" => 73,
1303 "(" => 74,
1304 "|" => 75,
1305 "." => 77,
1306 ">" => 78
1308 DEFAULT => -119
1310 {#State 159
1311 ACTIONS => {
1312 "-" => 65,
1313 ":" => 64,
1314 "<" => 67,
1315 "+" => 69,
1316 "~" => 68,
1317 "*" => 76,
1318 "?" => 66,
1319 "{" => 70,
1320 "&" => 71,
1321 "/" => 72,
1322 "=" => 73,
1323 "(" => 74,
1324 "|" => 75,
1325 "." => 77,
1326 ">" => 78
1328 DEFAULT => -100
1330 {#State 160
1331 ACTIONS => {
1332 ":" => 64,
1333 "<" => 67,
1334 "~" => 68,
1335 "?" => 66,
1336 "{" => 70,
1337 "=" => 73
1339 DEFAULT => -118
1341 {#State 161
1342 ACTIONS => {
1343 'CONSTANT' => 44,
1344 'TEXT' => 13,
1345 "]" => 179,
1346 'IDENTIFIER' => 22
1348 DEFAULT => -101,
1349 GOTOS => {
1350 'identifier' => 45,
1351 'anytext' => 180,
1352 'text' => 46,
1353 'constant' => 43
1356 {#State 162
1357 ACTIONS => {
1358 ";" => 181
1361 {#State 163
1362 ACTIONS => {
1363 "}" => 182
1365 DEFAULT => -91,
1366 GOTOS => {
1367 'optional_base_element' => 184,
1368 'property_list' => 183
1371 {#State 164
1372 ACTIONS => {
1373 "}" => 185
1375 DEFAULT => -91,
1376 GOTOS => {
1377 'base_element' => 186,
1378 'property_list' => 173
1381 {#State 165
1382 ACTIONS => {
1383 "=" => 187
1385 DEFAULT => -54
1387 {#State 166
1388 DEFAULT => -52
1390 {#State 167
1391 ACTIONS => {
1392 "}" => 188,
1393 "," => 189
1396 {#State 168
1397 ACTIONS => {
1398 "," => 190
1400 DEFAULT => -63
1402 {#State 169
1403 DEFAULT => -60
1405 {#State 170
1406 ACTIONS => {
1407 "=" => 191
1410 {#State 171
1411 ACTIONS => {
1412 "}" => 192
1415 {#State 172
1416 DEFAULT => -86
1418 {#State 173
1419 ACTIONS => {
1420 'IDENTIFIER' => 22,
1421 "signed" => 95,
1422 'void' => 89,
1423 "unsigned" => 99,
1424 "[" => 17
1426 DEFAULT => -91,
1427 GOTOS => {
1428 'existingtype' => 96,
1429 'bitmap' => 51,
1430 'usertype' => 91,
1431 'property_list' => 90,
1432 'identifier' => 92,
1433 'struct' => 57,
1434 'enum' => 61,
1435 'type' => 193,
1436 'union' => 63,
1437 'sign' => 93
1440 {#State 174
1441 ACTIONS => {
1442 "," => 194,
1443 ")" => 195
1446 {#State 175
1447 DEFAULT => -85
1449 {#State 176
1450 DEFAULT => -28
1452 {#State 177
1453 ACTIONS => {
1454 "=" => 196
1457 {#State 178
1458 ACTIONS => {
1459 'CONSTANT' => 44,
1460 'TEXT' => 13,
1461 'IDENTIFIER' => 22
1463 DEFAULT => -101,
1464 GOTOS => {
1465 'identifier' => 45,
1466 'anytext' => 197,
1467 'text' => 46,
1468 'constant' => 43
1471 {#State 179
1472 ACTIONS => {
1473 "[" => 161
1475 DEFAULT => -88,
1476 GOTOS => {
1477 'array_len' => 198
1480 {#State 180
1481 ACTIONS => {
1482 "-" => 65,
1483 ":" => 64,
1484 "?" => 66,
1485 "<" => 67,
1486 "+" => 69,
1487 "~" => 68,
1488 "&" => 71,
1489 "{" => 70,
1490 "/" => 72,
1491 "=" => 73,
1492 "|" => 75,
1493 "(" => 74,
1494 "*" => 76,
1495 "." => 77,
1496 "]" => 199,
1497 ">" => 78
1500 {#State 181
1501 DEFAULT => -35
1503 {#State 182
1504 DEFAULT => -75
1506 {#State 183
1507 ACTIONS => {
1508 "[" => 17
1510 DEFAULT => -91,
1511 GOTOS => {
1512 'base_or_empty' => 200,
1513 'base_element' => 201,
1514 'empty_element' => 202,
1515 'property_list' => 203
1518 {#State 184
1519 DEFAULT => -74
1521 {#State 185
1522 DEFAULT => -65
1524 {#State 186
1525 ACTIONS => {
1526 ";" => 204
1529 {#State 187
1530 ACTIONS => {
1531 'CONSTANT' => 44,
1532 'TEXT' => 13,
1533 'IDENTIFIER' => 22
1535 DEFAULT => -101,
1536 GOTOS => {
1537 'identifier' => 45,
1538 'anytext' => 205,
1539 'text' => 46,
1540 'constant' => 43
1543 {#State 188
1544 DEFAULT => -48
1546 {#State 189
1547 ACTIONS => {
1548 'IDENTIFIER' => 22
1550 GOTOS => {
1551 'identifier' => 165,
1552 'enum_element' => 206
1555 {#State 190
1556 ACTIONS => {
1557 'IDENTIFIER' => 22
1559 GOTOS => {
1560 'identifier' => 170,
1561 'bitmap_element' => 207
1564 {#State 191
1565 ACTIONS => {
1566 'CONSTANT' => 44,
1567 'TEXT' => 13,
1568 'IDENTIFIER' => 22
1570 DEFAULT => -101,
1571 GOTOS => {
1572 'identifier' => 45,
1573 'anytext' => 208,
1574 'text' => 46,
1575 'constant' => 43
1578 {#State 192
1579 DEFAULT => -56
1581 {#State 193
1582 DEFAULT => -80,
1583 GOTOS => {
1584 'pointers' => 209
1587 {#State 194
1588 DEFAULT => -91,
1589 GOTOS => {
1590 'base_element' => 210,
1591 'property_list' => 173
1594 {#State 195
1595 ACTIONS => {
1596 ";" => 211
1599 {#State 196
1600 ACTIONS => {
1601 'CONSTANT' => 44,
1602 'TEXT' => 13,
1603 'IDENTIFIER' => 22
1605 DEFAULT => -101,
1606 GOTOS => {
1607 'identifier' => 45,
1608 'anytext' => 212,
1609 'text' => 46,
1610 'constant' => 43
1613 {#State 197
1614 ACTIONS => {
1615 "-" => 65,
1616 ":" => 64,
1617 "?" => 66,
1618 "<" => 67,
1619 ";" => 213,
1620 "+" => 69,
1621 "~" => 68,
1622 "&" => 71,
1623 "{" => 70,
1624 "/" => 72,
1625 "=" => 73,
1626 "|" => 75,
1627 "(" => 74,
1628 "*" => 76,
1629 "." => 77,
1630 ">" => 78
1633 {#State 198
1634 DEFAULT => -89
1636 {#State 199
1637 ACTIONS => {
1638 "[" => 161
1640 DEFAULT => -88,
1641 GOTOS => {
1642 'array_len' => 214
1645 {#State 200
1646 DEFAULT => -72
1648 {#State 201
1649 ACTIONS => {
1650 ";" => 215
1653 {#State 202
1654 DEFAULT => -71
1656 {#State 203
1657 ACTIONS => {
1658 'IDENTIFIER' => 22,
1659 "signed" => 95,
1660 ";" => 216,
1661 'void' => 89,
1662 "unsigned" => 99,
1663 "[" => 17
1665 DEFAULT => -91,
1666 GOTOS => {
1667 'existingtype' => 96,
1668 'bitmap' => 51,
1669 'usertype' => 91,
1670 'property_list' => 90,
1671 'identifier' => 92,
1672 'struct' => 57,
1673 'enum' => 61,
1674 'type' => 193,
1675 'union' => 63,
1676 'sign' => 93
1679 {#State 204
1680 DEFAULT => -83
1682 {#State 205
1683 ACTIONS => {
1684 "-" => 65,
1685 ":" => 64,
1686 "<" => 67,
1687 "+" => 69,
1688 "~" => 68,
1689 "*" => 76,
1690 "?" => 66,
1691 "{" => 70,
1692 "&" => 71,
1693 "/" => 72,
1694 "=" => 73,
1695 "(" => 74,
1696 "|" => 75,
1697 "." => 77,
1698 ">" => 78
1700 DEFAULT => -55
1702 {#State 206
1703 DEFAULT => -53
1705 {#State 207
1706 DEFAULT => -61
1708 {#State 208
1709 ACTIONS => {
1710 "-" => 65,
1711 ":" => 64,
1712 "<" => 67,
1713 "+" => 69,
1714 "~" => 68,
1715 "*" => 76,
1716 "?" => 66,
1717 "{" => 70,
1718 "&" => 71,
1719 "/" => 72,
1720 "=" => 73,
1721 "(" => 74,
1722 "|" => 75,
1723 "." => 77,
1724 ">" => 78
1726 DEFAULT => -64
1728 {#State 209
1729 ACTIONS => {
1730 'IDENTIFIER' => 22,
1731 "*" => 157
1733 GOTOS => {
1734 'identifier' => 217
1737 {#State 210
1738 DEFAULT => -87
1740 {#State 211
1741 DEFAULT => -27
1743 {#State 212
1744 ACTIONS => {
1745 "-" => 65,
1746 ":" => 64,
1747 "?" => 66,
1748 "<" => 67,
1749 ";" => 218,
1750 "+" => 69,
1751 "~" => 68,
1752 "&" => 71,
1753 "{" => 70,
1754 "/" => 72,
1755 "=" => 73,
1756 "|" => 75,
1757 "(" => 74,
1758 "*" => 76,
1759 "." => 77,
1760 ">" => 78
1763 {#State 213
1764 DEFAULT => -25
1766 {#State 214
1767 DEFAULT => -90
1769 {#State 215
1770 DEFAULT => -70
1772 {#State 216
1773 DEFAULT => -69
1775 {#State 217
1776 ACTIONS => {
1777 "[" => 161
1779 DEFAULT => -88,
1780 GOTOS => {
1781 'array_len' => 219
1784 {#State 218
1785 DEFAULT => -26
1787 {#State 219
1788 DEFAULT => -79
1791 yyrules =>
1793 [#Rule 0
1794 '$start', 2, undef
1796 [#Rule 1
1797 'idl', 0, undef
1799 [#Rule 2
1800 'idl', 2,
1802 #line 19 "idl.yp"
1803 { push(@{$_[1]}, $_[2]); $_[1] }
1805 [#Rule 3
1806 'idl', 2,
1808 #line 20 "idl.yp"
1809 { push(@{$_[1]}, $_[2]); $_[1] }
1811 [#Rule 4
1812 'idl', 2,
1814 #line 21 "idl.yp"
1815 { push(@{$_[1]}, $_[2]); $_[1] }
1817 [#Rule 5
1818 'idl', 2,
1820 #line 22 "idl.yp"
1821 { push(@{$_[1]}, $_[2]); $_[1] }
1823 [#Rule 6
1824 'idl', 2,
1826 #line 23 "idl.yp"
1827 { push(@{$_[1]}, $_[2]); $_[1] }
1829 [#Rule 7
1830 'import', 3,
1832 #line 26 "idl.yp"
1834 "TYPE" => "IMPORT",
1835 "PATHS" => $_[2],
1836 "FILE" => $_[0]->YYData->{FILE},
1837 "LINE" => $_[0]->YYData->{LINE}
1840 [#Rule 8
1841 'include', 3,
1843 #line 33 "idl.yp"
1845 "TYPE" => "INCLUDE",
1846 "PATHS" => $_[2],
1847 "FILE" => $_[0]->YYData->{FILE},
1848 "LINE" => $_[0]->YYData->{LINE}
1851 [#Rule 9
1852 'importlib', 3,
1854 #line 40 "idl.yp"
1856 "TYPE" => "IMPORTLIB",
1857 "PATHS" => $_[2],
1858 "FILE" => $_[0]->YYData->{FILE},
1859 "LINE" => $_[0]->YYData->{LINE}
1862 [#Rule 10
1863 'commalist', 1,
1865 #line 49 "idl.yp"
1866 { [ $_[1] ] }
1868 [#Rule 11
1869 'commalist', 3,
1871 #line 50 "idl.yp"
1872 { push(@{$_[1]}, $_[3]); $_[1] }
1874 [#Rule 12
1875 'coclass', 7,
1877 #line 54 "idl.yp"
1879 "TYPE" => "COCLASS",
1880 "PROPERTIES" => $_[1],
1881 "NAME" => $_[3],
1882 "DATA" => $_[5],
1883 "FILE" => $_[0]->YYData->{FILE},
1884 "LINE" => $_[0]->YYData->{LINE},
1887 [#Rule 13
1888 'interface_names', 0, undef
1890 [#Rule 14
1891 'interface_names', 4,
1893 #line 66 "idl.yp"
1894 { push(@{$_[1]}, $_[2]); $_[1] }
1896 [#Rule 15
1897 'interface', 8,
1899 #line 70 "idl.yp"
1901 "TYPE" => "INTERFACE",
1902 "PROPERTIES" => $_[1],
1903 "NAME" => $_[3],
1904 "BASE" => $_[4],
1905 "DATA" => $_[6],
1906 "FILE" => $_[0]->YYData->{FILE},
1907 "LINE" => $_[0]->YYData->{LINE},
1910 [#Rule 16
1911 'base_interface', 0, undef
1913 [#Rule 17
1914 'base_interface', 2,
1916 #line 83 "idl.yp"
1917 { $_[2] }
1919 [#Rule 18
1920 'definitions', 1,
1922 #line 87 "idl.yp"
1923 { [ $_[1] ] }
1925 [#Rule 19
1926 'definitions', 2,
1928 #line 88 "idl.yp"
1929 { push(@{$_[1]}, $_[2]); $_[1] }
1931 [#Rule 20
1932 'definition', 1, undef
1934 [#Rule 21
1935 'definition', 1, undef
1937 [#Rule 22
1938 'definition', 1, undef
1940 [#Rule 23
1941 'definition', 1, undef
1943 [#Rule 24
1944 'definition', 1, undef
1946 [#Rule 25
1947 'const', 7,
1949 #line 96 "idl.yp"
1951 "TYPE" => "CONST",
1952 "DTYPE" => $_[2],
1953 "POINTERS" => $_[3],
1954 "NAME" => $_[4],
1955 "VALUE" => $_[6],
1956 "FILE" => $_[0]->YYData->{FILE},
1957 "LINE" => $_[0]->YYData->{LINE},
1960 [#Rule 26
1961 'const', 8,
1963 #line 106 "idl.yp"
1965 "TYPE" => "CONST",
1966 "DTYPE" => $_[2],
1967 "POINTERS" => $_[3],
1968 "NAME" => $_[4],
1969 "ARRAY_LEN" => $_[5],
1970 "VALUE" => $_[7],
1971 "FILE" => $_[0]->YYData->{FILE},
1972 "LINE" => $_[0]->YYData->{LINE},
1975 [#Rule 27
1976 'function', 7,
1978 #line 120 "idl.yp"
1980 "TYPE" => "FUNCTION",
1981 "NAME" => $_[3],
1982 "RETURN_TYPE" => $_[2],
1983 "PROPERTIES" => $_[1],
1984 "ELEMENTS" => $_[5],
1985 "FILE" => $_[0]->YYData->{FILE},
1986 "LINE" => $_[0]->YYData->{LINE},
1989 [#Rule 28
1990 'declare', 5,
1992 #line 132 "idl.yp"
1994 "TYPE" => "DECLARE",
1995 "PROPERTIES" => $_[2],
1996 "NAME" => $_[4],
1997 "DATA" => $_[3],
1998 "FILE" => $_[0]->YYData->{FILE},
1999 "LINE" => $_[0]->YYData->{LINE},
2002 [#Rule 29
2003 'decl_type', 1, undef
2005 [#Rule 30
2006 'decl_type', 1, undef
2008 [#Rule 31
2009 'decl_type', 1, undef
2011 [#Rule 32
2012 'decl_enum', 1,
2014 #line 146 "idl.yp"
2016 "TYPE" => "ENUM"
2019 [#Rule 33
2020 'decl_bitmap', 1,
2022 #line 152 "idl.yp"
2024 "TYPE" => "BITMAP"
2027 [#Rule 34
2028 'decl_union', 1,
2030 #line 158 "idl.yp"
2032 "TYPE" => "UNION"
2035 [#Rule 35
2036 'typedef', 6,
2038 #line 164 "idl.yp"
2040 "TYPE" => "TYPEDEF",
2041 "PROPERTIES" => $_[1],
2042 "NAME" => $_[4],
2043 "DATA" => $_[3],
2044 "ARRAY_LEN" => $_[5],
2045 "FILE" => $_[0]->YYData->{FILE},
2046 "LINE" => $_[0]->YYData->{LINE},
2049 [#Rule 36
2050 'usertype', 1, undef
2052 [#Rule 37
2053 'usertype', 1, undef
2055 [#Rule 38
2056 'usertype', 1, undef
2058 [#Rule 39
2059 'usertype', 1, undef
2061 [#Rule 40
2062 'typedecl', 2,
2064 #line 177 "idl.yp"
2065 { $_[1] }
2067 [#Rule 41
2068 'sign', 1, undef
2070 [#Rule 42
2071 'sign', 1, undef
2073 [#Rule 43
2074 'existingtype', 2,
2076 #line 182 "idl.yp"
2077 { ($_[1]?$_[1]:"signed") ." $_[2]" }
2079 [#Rule 44
2080 'existingtype', 1, undef
2082 [#Rule 45
2083 'type', 1, undef
2085 [#Rule 46
2086 'type', 1, undef
2088 [#Rule 47
2089 'type', 1,
2091 #line 186 "idl.yp"
2092 { "void" }
2094 [#Rule 48
2095 'enum_body', 3,
2097 #line 188 "idl.yp"
2098 { $_[2] }
2100 [#Rule 49
2101 'opt_enum_body', 0, undef
2103 [#Rule 50
2104 'opt_enum_body', 1, undef
2106 [#Rule 51
2107 'enum', 4,
2109 #line 191 "idl.yp"
2111 "TYPE" => "ENUM",
2112 "PROPERTIES" => $_[1],
2113 "NAME" => $_[3],
2114 "ELEMENTS" => $_[4]
2117 [#Rule 52
2118 'enum_elements', 1,
2120 #line 200 "idl.yp"
2121 { [ $_[1] ] }
2123 [#Rule 53
2124 'enum_elements', 3,
2126 #line 201 "idl.yp"
2127 { push(@{$_[1]}, $_[3]); $_[1] }
2129 [#Rule 54
2130 'enum_element', 1, undef
2132 [#Rule 55
2133 'enum_element', 3,
2135 #line 205 "idl.yp"
2136 { "$_[1]$_[2]$_[3]" }
2138 [#Rule 56
2139 'bitmap_body', 3,
2141 #line 208 "idl.yp"
2142 { $_[2] }
2144 [#Rule 57
2145 'opt_bitmap_body', 0, undef
2147 [#Rule 58
2148 'opt_bitmap_body', 1, undef
2150 [#Rule 59
2151 'bitmap', 4,
2153 #line 211 "idl.yp"
2155 "TYPE" => "BITMAP",
2156 "PROPERTIES" => $_[1],
2157 "NAME" => $_[3],
2158 "ELEMENTS" => $_[4]
2161 [#Rule 60
2162 'bitmap_elements', 1,
2164 #line 220 "idl.yp"
2165 { [ $_[1] ] }
2167 [#Rule 61
2168 'bitmap_elements', 3,
2170 #line 221 "idl.yp"
2171 { push(@{$_[1]}, $_[3]); $_[1] }
2173 [#Rule 62
2174 'opt_bitmap_elements', 0, undef
2176 [#Rule 63
2177 'opt_bitmap_elements', 1, undef
2179 [#Rule 64
2180 'bitmap_element', 3,
2182 #line 226 "idl.yp"
2183 { "$_[1] ( $_[3] )" }
2185 [#Rule 65
2186 'struct_body', 3,
2188 #line 229 "idl.yp"
2189 { $_[2] }
2191 [#Rule 66
2192 'opt_struct_body', 0, undef
2194 [#Rule 67
2195 'opt_struct_body', 1, undef
2197 [#Rule 68
2198 'struct', 4,
2200 #line 233 "idl.yp"
2202 "TYPE" => "STRUCT",
2203 "PROPERTIES" => $_[1],
2204 "NAME" => $_[3],
2205 "ELEMENTS" => $_[4]
2208 [#Rule 69
2209 'empty_element', 2,
2211 #line 242 "idl.yp"
2213 "NAME" => "",
2214 "TYPE" => "EMPTY",
2215 "PROPERTIES" => $_[1],
2216 "POINTERS" => 0,
2217 "ARRAY_LEN" => [],
2218 "FILE" => $_[0]->YYData->{FILE},
2219 "LINE" => $_[0]->YYData->{LINE},
2222 [#Rule 70
2223 'base_or_empty', 2, undef
2225 [#Rule 71
2226 'base_or_empty', 1, undef
2228 [#Rule 72
2229 'optional_base_element', 2,
2231 #line 256 "idl.yp"
2232 { $_[2]->{PROPERTIES} = FlattenHash([$_[1],$_[2]->{PROPERTIES}]); $_[2] }
2234 [#Rule 73
2235 'union_elements', 0, undef
2237 [#Rule 74
2238 'union_elements', 2,
2240 #line 261 "idl.yp"
2241 { push(@{$_[1]}, $_[2]); $_[1] }
2243 [#Rule 75
2244 'union_body', 3,
2246 #line 264 "idl.yp"
2247 { $_[2] }
2249 [#Rule 76
2250 'opt_union_body', 0, undef
2252 [#Rule 77
2253 'opt_union_body', 1, undef
2255 [#Rule 78
2256 'union', 4,
2258 #line 268 "idl.yp"
2260 "TYPE" => "UNION",
2261 "PROPERTIES" => $_[1],
2262 "NAME" => $_[3],
2263 "ELEMENTS" => $_[4]
2266 [#Rule 79
2267 'base_element', 5,
2269 #line 277 "idl.yp"
2271 "NAME" => $_[4],
2272 "TYPE" => $_[2],
2273 "PROPERTIES" => $_[1],
2274 "POINTERS" => $_[3],
2275 "ARRAY_LEN" => $_[5],
2276 "FILE" => $_[0]->YYData->{FILE},
2277 "LINE" => $_[0]->YYData->{LINE},
2280 [#Rule 80
2281 'pointers', 0,
2283 #line 291 "idl.yp"
2284 { 0 }
2286 [#Rule 81
2287 'pointers', 2,
2289 #line 292 "idl.yp"
2290 { $_[1]+1 }
2292 [#Rule 82
2293 'element_list1', 0, undef
2295 [#Rule 83
2296 'element_list1', 3,
2298 #line 297 "idl.yp"
2299 { push(@{$_[1]}, $_[2]); $_[1] }
2301 [#Rule 84
2302 'element_list2', 0, undef
2304 [#Rule 85
2305 'element_list2', 1, undef
2307 [#Rule 86
2308 'element_list2', 1,
2310 #line 303 "idl.yp"
2311 { [ $_[1] ] }
2313 [#Rule 87
2314 'element_list2', 3,
2316 #line 304 "idl.yp"
2317 { push(@{$_[1]}, $_[3]); $_[1] }
2319 [#Rule 88
2320 'array_len', 0, undef
2322 [#Rule 89
2323 'array_len', 3,
2325 #line 309 "idl.yp"
2326 { push(@{$_[3]}, "*"); $_[3] }
2328 [#Rule 90
2329 'array_len', 4,
2331 #line 310 "idl.yp"
2332 { push(@{$_[4]}, "$_[2]"); $_[4] }
2334 [#Rule 91
2335 'property_list', 0, undef
2337 [#Rule 92
2338 'property_list', 4,
2340 #line 316 "idl.yp"
2341 { FlattenHash([$_[1],$_[3]]); }
2343 [#Rule 93
2344 'properties', 1,
2346 #line 319 "idl.yp"
2347 { $_[1] }
2349 [#Rule 94
2350 'properties', 3,
2352 #line 320 "idl.yp"
2353 { FlattenHash([$_[1], $_[3]]); }
2355 [#Rule 95
2356 'property', 1,
2358 #line 323 "idl.yp"
2359 {{ "$_[1]" => "1" }}
2361 [#Rule 96
2362 'property', 4,
2364 #line 324 "idl.yp"
2365 {{ "$_[1]" => "$_[3]" }}
2367 [#Rule 97
2368 'listtext', 1, undef
2370 [#Rule 98
2371 'listtext', 3,
2373 #line 329 "idl.yp"
2374 { "$_[1] $_[3]" }
2376 [#Rule 99
2377 'commalisttext', 1, undef
2379 [#Rule 100
2380 'commalisttext', 3,
2382 #line 334 "idl.yp"
2383 { "$_[1],$_[3]" }
2385 [#Rule 101
2386 'anytext', 0,
2388 #line 338 "idl.yp"
2389 { "" }
2391 [#Rule 102
2392 'anytext', 1, undef
2394 [#Rule 103
2395 'anytext', 1, undef
2397 [#Rule 104
2398 'anytext', 1, undef
2400 [#Rule 105
2401 'anytext', 3,
2403 #line 340 "idl.yp"
2404 { "$_[1]$_[2]$_[3]" }
2406 [#Rule 106
2407 'anytext', 3,
2409 #line 341 "idl.yp"
2410 { "$_[1]$_[2]$_[3]" }
2412 [#Rule 107
2413 'anytext', 3,
2415 #line 342 "idl.yp"
2416 { "$_[1]$_[2]$_[3]" }
2418 [#Rule 108
2419 'anytext', 3,
2421 #line 343 "idl.yp"
2422 { "$_[1]$_[2]$_[3]" }
2424 [#Rule 109
2425 'anytext', 3,
2427 #line 344 "idl.yp"
2428 { "$_[1]$_[2]$_[3]" }
2430 [#Rule 110
2431 'anytext', 3,
2433 #line 345 "idl.yp"
2434 { "$_[1]$_[2]$_[3]" }
2436 [#Rule 111
2437 'anytext', 3,
2439 #line 346 "idl.yp"
2440 { "$_[1]$_[2]$_[3]" }
2442 [#Rule 112
2443 'anytext', 3,
2445 #line 347 "idl.yp"
2446 { "$_[1]$_[2]$_[3]" }
2448 [#Rule 113
2449 'anytext', 3,
2451 #line 348 "idl.yp"
2452 { "$_[1]$_[2]$_[3]" }
2454 [#Rule 114
2455 'anytext', 3,
2457 #line 349 "idl.yp"
2458 { "$_[1]$_[2]$_[3]" }
2460 [#Rule 115
2461 'anytext', 3,
2463 #line 350 "idl.yp"
2464 { "$_[1]$_[2]$_[3]" }
2466 [#Rule 116
2467 'anytext', 3,
2469 #line 351 "idl.yp"
2470 { "$_[1]$_[2]$_[3]" }
2472 [#Rule 117
2473 'anytext', 3,
2475 #line 352 "idl.yp"
2476 { "$_[1]$_[2]$_[3]" }
2478 [#Rule 118
2479 'anytext', 5,
2481 #line 353 "idl.yp"
2482 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2484 [#Rule 119
2485 'anytext', 5,
2487 #line 354 "idl.yp"
2488 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2490 [#Rule 120
2491 'identifier', 1, undef
2493 [#Rule 121
2494 'optional_identifier', 1, undef
2496 [#Rule 122
2497 'optional_identifier', 0, undef
2499 [#Rule 123
2500 'constant', 1, undef
2502 [#Rule 124
2503 'text', 1,
2505 #line 368 "idl.yp"
2506 { "\"$_[1]\"" }
2508 [#Rule 125
2509 'optional_semicolon', 0, undef
2511 [#Rule 126
2512 'optional_semicolon', 1, undef
2515 @_);
2516 bless($self,$class);
2519 #line 379 "idl.yp"
2522 use Parse::Pidl qw(error);
2524 #####################################################################
2525 # flatten an array of hashes into a single hash
2526 sub FlattenHash($)
2528 my $a = shift;
2529 my %b;
2530 for my $d (@{$a}) {
2531 for my $k (keys %{$d}) {
2532 $b{$k} = $d->{$k};
2535 return \%b;
2540 #####################################################################
2541 # traverse a perl data structure removing any empty arrays or
2542 # hashes and any hash elements that map to undef
2543 sub CleanData($)
2545 sub CleanData($);
2546 my($v) = shift;
2547 return undef if (not defined($v));
2548 if (ref($v) eq "ARRAY") {
2549 foreach my $i (0 .. $#{$v}) {
2550 CleanData($v->[$i]);
2551 if (ref($v->[$i]) eq "ARRAY" && $#{$v->[$i]}==-1) {
2552 $v->[$i] = undef;
2553 next;
2556 # this removes any undefined elements from the array
2557 @{$v} = grep { defined $_ } @{$v};
2558 } elsif (ref($v) eq "HASH") {
2559 foreach my $x (keys %{$v}) {
2560 CleanData($v->{$x});
2561 if (!defined $v->{$x}) { delete($v->{$x}); next; }
2562 if (ref($v->{$x}) eq "ARRAY" && $#{$v->{$x}}==-1) { delete($v->{$x}); next; }
2565 return $v;
2568 sub _Error {
2569 if (exists $_[0]->YYData->{ERRMSG}) {
2570 error($_[0]->YYData, $_[0]->YYData->{ERRMSG});
2571 delete $_[0]->YYData->{ERRMSG};
2572 return;
2574 my $last_token = $_[0]->YYData->{LAST_TOKEN};
2576 error($_[0]->YYData, "Syntax error near '$last_token'");
2579 sub _Lexer($)
2581 my($parser)=shift;
2583 $parser->YYData->{INPUT} or return('',undef);
2585 again:
2586 $parser->YYData->{INPUT} =~ s/^[ \t]*//;
2588 for ($parser->YYData->{INPUT}) {
2589 if (/^\#/) {
2590 if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
2591 $parser->YYData->{LINE} = $1-1;
2592 $parser->YYData->{FILE} = $2;
2593 goto again;
2595 if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
2596 $parser->YYData->{LINE} = $1-1;
2597 $parser->YYData->{FILE} = $2;
2598 goto again;
2600 if (s/^(\#.*)$//m) {
2601 goto again;
2604 if (s/^(\n)//) {
2605 $parser->YYData->{LINE}++;
2606 goto again;
2608 if (s/^\"(.*?)\"//) {
2609 $parser->YYData->{LAST_TOKEN} = $1;
2610 return('TEXT',$1);
2612 if (s/^(\d+)(\W|$)/$2/) {
2613 $parser->YYData->{LAST_TOKEN} = $1;
2614 return('CONSTANT',$1);
2616 if (s/^([\w_]+)//) {
2617 $parser->YYData->{LAST_TOKEN} = $1;
2618 if ($1 =~
2619 /^(coclass|interface|const|typedef|declare|union
2620 |struct|enum|bitmap|void|unsigned|signed|import|include
2621 |importlib)$/x) {
2622 return $1;
2624 return('IDENTIFIER',$1);
2626 if (s/^(.)//s) {
2627 $parser->YYData->{LAST_TOKEN} = $1;
2628 return($1,$1);
2633 sub parse_string
2635 my ($data,$filename) = @_;
2637 my $self = new Parse::Pidl::IDL;
2639 $self->YYData->{FILE} = $filename;
2640 $self->YYData->{INPUT} = $data;
2641 $self->YYData->{LINE} = 0;
2642 $self->YYData->{LAST_TOKEN} = "NONE";
2644 my $idl = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error );
2646 return CleanData($idl);
2649 sub parse_file($$)
2651 my ($filename,$incdirs) = @_;
2653 my $saved_delim = $/;
2654 undef $/;
2655 my $cpp = $ENV{CPP};
2656 if (! defined $cpp) {
2657 $cpp = "cpp";
2659 my $includes = join('',map { " -I$_" } @$incdirs);
2660 my $data = `$cpp -D__PIDL__$includes -xc $filename`;
2661 $/ = $saved_delim;
2663 return parse_string($data, $filename);