53be9fc65514da405e19501680dcb31c3ca6a183
[ira/wip.git] / pidl / lib / Parse / Pidl / IDL.pm
1 ####################################################################
2 #
3 #    This file was generated using Parse::Yapp version 1.05.
4 #
5 #        Don't edit this file, use source file instead.
6 #
7 #             ANY CHANGE MADE HERE WILL BE LOST !
8 #
9 ####################################################################
10 package Parse::Pidl::IDL;
11 use vars qw ( @ISA );
12 use strict;
13
14 @ISA= qw ( Parse::Yapp::Driver );
15 use Parse::Yapp::Driver;
16
17
18
19 sub new {
20         my($class)=shift;
21         ref($class)
22     and $class=ref($class);
23
24     my($self)=$class->SUPER::new( yyversion => '1.05',
25                                   yystates =>
26 [
27         {#State 0
28                 DEFAULT => -1,
29                 GOTOS => {
30                         'idl' => 1
31                 }
32         },
33         {#State 1
34                 ACTIONS => {
35                         '' => 2,
36                         "cpp_quote" => 3,
37                         "importlib" => 4,
38                         "import" => 7,
39                         "include" => 13
40                 },
41                 DEFAULT => -87,
42                 GOTOS => {
43                         'cpp_quote' => 11,
44                         'importlib' => 10,
45                         'interface' => 9,
46                         'include' => 5,
47                         'coclass' => 12,
48                         'import' => 8,
49                         'property_list' => 6
50                 }
51         },
52         {#State 2
53                 DEFAULT => 0
54         },
55         {#State 3
56                 ACTIONS => {
57                         "(" => 14
58                 }
59         },
60         {#State 4
61                 ACTIONS => {
62                         'TEXT' => 16
63                 },
64                 GOTOS => {
65                         'commalist' => 15,
66                         'text' => 17
67                 }
68         },
69         {#State 5
70                 DEFAULT => -5
71         },
72         {#State 6
73                 ACTIONS => {
74                         "coclass" => 18,
75                         "[" => 20,
76                         "interface" => 19
77                 }
78         },
79         {#State 7
80                 ACTIONS => {
81                         'TEXT' => 16
82                 },
83                 GOTOS => {
84                         'commalist' => 21,
85                         'text' => 17
86                 }
87         },
88         {#State 8
89                 DEFAULT => -4
90         },
91         {#State 9
92                 DEFAULT => -2
93         },
94         {#State 10
95                 DEFAULT => -6
96         },
97         {#State 11
98                 DEFAULT => -7
99         },
100         {#State 12
101                 DEFAULT => -3
102         },
103         {#State 13
104                 ACTIONS => {
105                         'TEXT' => 16
106                 },
107                 GOTOS => {
108                         'commalist' => 22,
109                         'text' => 17
110                 }
111         },
112         {#State 14
113                 ACTIONS => {
114                         'TEXT' => 16
115                 },
116                 GOTOS => {
117                         'text' => 23
118                 }
119         },
120         {#State 15
121                 ACTIONS => {
122                         ";" => 24,
123                         "," => 25
124                 }
125         },
126         {#State 16
127                 DEFAULT => -118
128         },
129         {#State 17
130                 DEFAULT => -11
131         },
132         {#State 18
133                 ACTIONS => {
134                         'IDENTIFIER' => 26
135                 },
136                 GOTOS => {
137                         'identifier' => 27
138                 }
139         },
140         {#State 19
141                 ACTIONS => {
142                         'IDENTIFIER' => 26
143                 },
144                 GOTOS => {
145                         'identifier' => 28
146                 }
147         },
148         {#State 20
149                 ACTIONS => {
150                         'IDENTIFIER' => 26
151                 },
152                 GOTOS => {
153                         'identifier' => 30,
154                         'property' => 31,
155                         'properties' => 29
156                 }
157         },
158         {#State 21
159                 ACTIONS => {
160                         ";" => 32,
161                         "," => 25
162                 }
163         },
164         {#State 22
165                 ACTIONS => {
166                         ";" => 33,
167                         "," => 25
168                 }
169         },
170         {#State 23
171                 ACTIONS => {
172                         ")" => 34
173                 }
174         },
175         {#State 24
176                 DEFAULT => -10
177         },
178         {#State 25
179                 ACTIONS => {
180                         'TEXT' => 16
181                 },
182                 GOTOS => {
183                         'text' => 35
184                 }
185         },
186         {#State 26
187                 DEFAULT => -114
188         },
189         {#State 27
190                 ACTIONS => {
191                         "{" => 36
192                 }
193         },
194         {#State 28
195                 ACTIONS => {
196                         ":" => 37
197                 },
198                 DEFAULT => -17,
199                 GOTOS => {
200                         'base_interface' => 38
201                 }
202         },
203         {#State 29
204                 ACTIONS => {
205                         "," => 39,
206                         "]" => 40
207                 }
208         },
209         {#State 30
210                 ACTIONS => {
211                         "(" => 41
212                 },
213                 DEFAULT => -91
214         },
215         {#State 31
216                 DEFAULT => -89
217         },
218         {#State 32
219                 DEFAULT => -8
220         },
221         {#State 33
222                 DEFAULT => -9
223         },
224         {#State 34
225                 DEFAULT => -19
226         },
227         {#State 35
228                 DEFAULT => -12
229         },
230         {#State 36
231                 DEFAULT => -14,
232                 GOTOS => {
233                         'interface_names' => 42
234                 }
235         },
236         {#State 37
237                 ACTIONS => {
238                         'IDENTIFIER' => 26
239                 },
240                 GOTOS => {
241                         'identifier' => 43
242                 }
243         },
244         {#State 38
245                 ACTIONS => {
246                         "{" => 44
247                 }
248         },
249         {#State 39
250                 ACTIONS => {
251                         'IDENTIFIER' => 26
252                 },
253                 GOTOS => {
254                         'identifier' => 30,
255                         'property' => 45
256                 }
257         },
258         {#State 40
259                 DEFAULT => -88
260         },
261         {#State 41
262                 ACTIONS => {
263                         'CONSTANT' => 48,
264                         'TEXT' => 16,
265                         'IDENTIFIER' => 26
266                 },
267                 DEFAULT => -95,
268                 GOTOS => {
269                         'identifier' => 50,
270                         'text' => 51,
271                         'anytext' => 46,
272                         'constant' => 47,
273                         'commalisttext' => 49
274                 }
275         },
276         {#State 42
277                 ACTIONS => {
278                         "}" => 52,
279                         "interface" => 53
280                 }
281         },
282         {#State 43
283                 DEFAULT => -18
284         },
285         {#State 44
286                 ACTIONS => {
287                         "const" => 63
288                 },
289                 DEFAULT => -87,
290                 GOTOS => {
291                         'typedecl' => 54,
292                         'function' => 55,
293                         'definitions' => 57,
294                         'bitmap' => 56,
295                         'definition' => 60,
296                         'property_list' => 59,
297                         'usertype' => 58,
298                         'const' => 62,
299                         'struct' => 61,
300                         'typedef' => 65,
301                         'enum' => 64,
302                         'union' => 66
303                 }
304         },
305         {#State 45
306                 DEFAULT => -90
307         },
308         {#State 46
309                 ACTIONS => {
310                         "-" => 68,
311                         ":" => 67,
312                         "<" => 70,
313                         "+" => 72,
314                         "~" => 71,
315                         "*" => 79,
316                         "?" => 69,
317                         "{" => 73,
318                         "&" => 74,
319                         "/" => 75,
320                         "=" => 76,
321                         "(" => 77,
322                         "|" => 78,
323                         "." => 80,
324                         ">" => 81
325                 },
326                 DEFAULT => -93
327         },
328         {#State 47
329                 DEFAULT => -97
330         },
331         {#State 48
332                 DEFAULT => -117
333         },
334         {#State 49
335                 ACTIONS => {
336                         "," => 82,
337                         ")" => 83
338                 }
339         },
340         {#State 50
341                 DEFAULT => -96
342         },
343         {#State 51
344                 DEFAULT => -98
345         },
346         {#State 52
347                 ACTIONS => {
348                         ";" => 85
349                 },
350                 DEFAULT => -119,
351                 GOTOS => {
352                         'optional_semicolon' => 84
353                 }
354         },
355         {#State 53
356                 ACTIONS => {
357                         'IDENTIFIER' => 26
358                 },
359                 GOTOS => {
360                         'identifier' => 86
361                 }
362         },
363         {#State 54
364                 DEFAULT => -25
365         },
366         {#State 55
367                 DEFAULT => -22
368         },
369         {#State 56
370                 DEFAULT => -33
371         },
372         {#State 57
373                 ACTIONS => {
374                         "}" => 87,
375                         "const" => 63
376                 },
377                 DEFAULT => -87,
378                 GOTOS => {
379                         'typedecl' => 54,
380                         'function' => 55,
381                         'bitmap' => 56,
382                         'definition' => 88,
383                         'property_list' => 59,
384                         'usertype' => 58,
385                         'struct' => 61,
386                         'const' => 62,
387                         'typedef' => 65,
388                         'enum' => 64,
389                         'union' => 66
390                 }
391         },
392         {#State 58
393                 ACTIONS => {
394                         ";" => 89
395                 }
396         },
397         {#State 59
398                 ACTIONS => {
399                         "typedef" => 90,
400                         'IDENTIFIER' => 26,
401                         "signed" => 98,
402                         "union" => 91,
403                         "enum" => 100,
404                         "bitmap" => 101,
405                         'void' => 92,
406                         "unsigned" => 102,
407                         "[" => 20,
408                         "struct" => 97
409                 },
410                 GOTOS => {
411                         'existingtype' => 99,
412                         'bitmap' => 56,
413                         'usertype' => 94,
414                         'property_list' => 93,
415                         'identifier' => 95,
416                         'struct' => 61,
417                         'enum' => 64,
418                         'type' => 103,
419                         'union' => 66,
420                         'sign' => 96
421                 }
422         },
423         {#State 60
424                 DEFAULT => -20
425         },
426         {#State 61
427                 DEFAULT => -30
428         },
429         {#State 62
430                 DEFAULT => -23
431         },
432         {#State 63
433                 ACTIONS => {
434                         'IDENTIFIER' => 26
435                 },
436                 GOTOS => {
437                         'identifier' => 104
438                 }
439         },
440         {#State 64
441                 DEFAULT => -32
442         },
443         {#State 65
444                 DEFAULT => -24
445         },
446         {#State 66
447                 DEFAULT => -31
448         },
449         {#State 67
450                 ACTIONS => {
451                         'CONSTANT' => 48,
452                         'TEXT' => 16,
453                         'IDENTIFIER' => 26
454                 },
455                 DEFAULT => -95,
456                 GOTOS => {
457                         'identifier' => 50,
458                         'anytext' => 105,
459                         'text' => 51,
460                         'constant' => 47
461                 }
462         },
463         {#State 68
464                 ACTIONS => {
465                         'CONSTANT' => 48,
466                         'TEXT' => 16,
467                         'IDENTIFIER' => 26
468                 },
469                 DEFAULT => -95,
470                 GOTOS => {
471                         'identifier' => 50,
472                         'anytext' => 106,
473                         'text' => 51,
474                         'constant' => 47
475                 }
476         },
477         {#State 69
478                 ACTIONS => {
479                         'CONSTANT' => 48,
480                         'TEXT' => 16,
481                         'IDENTIFIER' => 26
482                 },
483                 DEFAULT => -95,
484                 GOTOS => {
485                         'identifier' => 50,
486                         'anytext' => 107,
487                         'text' => 51,
488                         'constant' => 47
489                 }
490         },
491         {#State 70
492                 ACTIONS => {
493                         'CONSTANT' => 48,
494                         'TEXT' => 16,
495                         'IDENTIFIER' => 26
496                 },
497                 DEFAULT => -95,
498                 GOTOS => {
499                         'identifier' => 50,
500                         'anytext' => 108,
501                         'text' => 51,
502                         'constant' => 47
503                 }
504         },
505         {#State 71
506                 ACTIONS => {
507                         'CONSTANT' => 48,
508                         'TEXT' => 16,
509                         'IDENTIFIER' => 26
510                 },
511                 DEFAULT => -95,
512                 GOTOS => {
513                         'identifier' => 50,
514                         'anytext' => 109,
515                         'text' => 51,
516                         'constant' => 47
517                 }
518         },
519         {#State 72
520                 ACTIONS => {
521                         'CONSTANT' => 48,
522                         'TEXT' => 16,
523                         'IDENTIFIER' => 26
524                 },
525                 DEFAULT => -95,
526                 GOTOS => {
527                         'identifier' => 50,
528                         'anytext' => 110,
529                         'text' => 51,
530                         'constant' => 47
531                 }
532         },
533         {#State 73
534                 ACTIONS => {
535                         'CONSTANT' => 48,
536                         'TEXT' => 16,
537                         'IDENTIFIER' => 26
538                 },
539                 DEFAULT => -95,
540                 GOTOS => {
541                         'identifier' => 50,
542                         'anytext' => 46,
543                         'text' => 51,
544                         'constant' => 47,
545                         'commalisttext' => 111
546                 }
547         },
548         {#State 74
549                 ACTIONS => {
550                         'CONSTANT' => 48,
551                         'TEXT' => 16,
552                         'IDENTIFIER' => 26
553                 },
554                 DEFAULT => -95,
555                 GOTOS => {
556                         'identifier' => 50,
557                         'anytext' => 112,
558                         'text' => 51,
559                         'constant' => 47
560                 }
561         },
562         {#State 75
563                 ACTIONS => {
564                         'CONSTANT' => 48,
565                         'TEXT' => 16,
566                         'IDENTIFIER' => 26
567                 },
568                 DEFAULT => -95,
569                 GOTOS => {
570                         'identifier' => 50,
571                         'anytext' => 113,
572                         'text' => 51,
573                         'constant' => 47
574                 }
575         },
576         {#State 76
577                 ACTIONS => {
578                         'CONSTANT' => 48,
579                         'TEXT' => 16,
580                         'IDENTIFIER' => 26
581                 },
582                 DEFAULT => -95,
583                 GOTOS => {
584                         'identifier' => 50,
585                         'anytext' => 114,
586                         'text' => 51,
587                         'constant' => 47
588                 }
589         },
590         {#State 77
591                 ACTIONS => {
592                         'CONSTANT' => 48,
593                         'TEXT' => 16,
594                         'IDENTIFIER' => 26
595                 },
596                 DEFAULT => -95,
597                 GOTOS => {
598                         'identifier' => 50,
599                         'anytext' => 46,
600                         'text' => 51,
601                         'constant' => 47,
602                         'commalisttext' => 115
603                 }
604         },
605         {#State 78
606                 ACTIONS => {
607                         'CONSTANT' => 48,
608                         'TEXT' => 16,
609                         'IDENTIFIER' => 26
610                 },
611                 DEFAULT => -95,
612                 GOTOS => {
613                         'identifier' => 50,
614                         'anytext' => 116,
615                         'text' => 51,
616                         'constant' => 47
617                 }
618         },
619         {#State 79
620                 ACTIONS => {
621                         'CONSTANT' => 48,
622                         'TEXT' => 16,
623                         'IDENTIFIER' => 26
624                 },
625                 DEFAULT => -95,
626                 GOTOS => {
627                         'identifier' => 50,
628                         'anytext' => 117,
629                         'text' => 51,
630                         'constant' => 47
631                 }
632         },
633         {#State 80
634                 ACTIONS => {
635                         'CONSTANT' => 48,
636                         'TEXT' => 16,
637                         'IDENTIFIER' => 26
638                 },
639                 DEFAULT => -95,
640                 GOTOS => {
641                         'identifier' => 50,
642                         'anytext' => 118,
643                         'text' => 51,
644                         'constant' => 47
645                 }
646         },
647         {#State 81
648                 ACTIONS => {
649                         'CONSTANT' => 48,
650                         'TEXT' => 16,
651                         'IDENTIFIER' => 26
652                 },
653                 DEFAULT => -95,
654                 GOTOS => {
655                         'identifier' => 50,
656                         'anytext' => 119,
657                         'text' => 51,
658                         'constant' => 47
659                 }
660         },
661         {#State 82
662                 ACTIONS => {
663                         'CONSTANT' => 48,
664                         'TEXT' => 16,
665                         'IDENTIFIER' => 26
666                 },
667                 DEFAULT => -95,
668                 GOTOS => {
669                         'identifier' => 50,
670                         'anytext' => 120,
671                         'text' => 51,
672                         'constant' => 47
673                 }
674         },
675         {#State 83
676                 DEFAULT => -92
677         },
678         {#State 84
679                 DEFAULT => -13
680         },
681         {#State 85
682                 DEFAULT => -120
683         },
684         {#State 86
685                 ACTIONS => {
686                         ";" => 121
687                 }
688         },
689         {#State 87
690                 ACTIONS => {
691                         ";" => 85
692                 },
693                 DEFAULT => -119,
694                 GOTOS => {
695                         'optional_semicolon' => 122
696                 }
697         },
698         {#State 88
699                 DEFAULT => -21
700         },
701         {#State 89
702                 DEFAULT => -34
703         },
704         {#State 90
705                 ACTIONS => {
706                         'IDENTIFIER' => 26,
707                         "signed" => 98,
708                         'void' => 92,
709                         "unsigned" => 102
710                 },
711                 DEFAULT => -87,
712                 GOTOS => {
713                         'existingtype' => 99,
714                         'bitmap' => 56,
715                         'usertype' => 94,
716                         'property_list' => 93,
717                         'identifier' => 95,
718                         'struct' => 61,
719                         'enum' => 64,
720                         'type' => 123,
721                         'union' => 66,
722                         'sign' => 96
723                 }
724         },
725         {#State 91
726                 ACTIONS => {
727                         'IDENTIFIER' => 124
728                 },
729                 DEFAULT => -115,
730                 GOTOS => {
731                         'optional_identifier' => 125
732                 }
733         },
734         {#State 92
735                 DEFAULT => -41
736         },
737         {#State 93
738                 ACTIONS => {
739                         "union" => 91,
740                         "enum" => 100,
741                         "bitmap" => 101,
742                         "[" => 20,
743                         "struct" => 97
744                 }
745         },
746         {#State 94
747                 DEFAULT => -39
748         },
749         {#State 95
750                 DEFAULT => -38
751         },
752         {#State 96
753                 ACTIONS => {
754                         'IDENTIFIER' => 26
755                 },
756                 GOTOS => {
757                         'identifier' => 126
758                 }
759         },
760         {#State 97
761                 ACTIONS => {
762                         'IDENTIFIER' => 124
763                 },
764                 DEFAULT => -115,
765                 GOTOS => {
766                         'optional_identifier' => 127
767                 }
768         },
769         {#State 98
770                 DEFAULT => -35
771         },
772         {#State 99
773                 DEFAULT => -40
774         },
775         {#State 100
776                 ACTIONS => {
777                         'IDENTIFIER' => 124
778                 },
779                 DEFAULT => -115,
780                 GOTOS => {
781                         'optional_identifier' => 128
782                 }
783         },
784         {#State 101
785                 ACTIONS => {
786                         'IDENTIFIER' => 124
787                 },
788                 DEFAULT => -115,
789                 GOTOS => {
790                         'optional_identifier' => 129
791                 }
792         },
793         {#State 102
794                 DEFAULT => -36
795         },
796         {#State 103
797                 ACTIONS => {
798                         'IDENTIFIER' => 26
799                 },
800                 GOTOS => {
801                         'identifier' => 130
802                 }
803         },
804         {#State 104
805                 DEFAULT => -74,
806                 GOTOS => {
807                         'pointers' => 131
808                 }
809         },
810         {#State 105
811                 ACTIONS => {
812                         "-" => 68,
813                         ":" => 67,
814                         "<" => 70,
815                         "+" => 72,
816                         "~" => 71,
817                         "*" => 79,
818                         "?" => 69,
819                         "{" => 73,
820                         "&" => 74,
821                         "/" => 75,
822                         "=" => 76,
823                         "(" => 77,
824                         "|" => 78,
825                         "." => 80,
826                         ">" => 81
827                 },
828                 DEFAULT => -108
829         },
830         {#State 106
831                 ACTIONS => {
832                         ":" => 67,
833                         "<" => 70,
834                         "~" => 71,
835                         "?" => 69,
836                         "{" => 73,
837                         "=" => 76
838                 },
839                 DEFAULT => -99
840         },
841         {#State 107
842                 ACTIONS => {
843                         "-" => 68,
844                         ":" => 67,
845                         "<" => 70,
846                         "+" => 72,
847                         "~" => 71,
848                         "*" => 79,
849                         "?" => 69,
850                         "{" => 73,
851                         "&" => 74,
852                         "/" => 75,
853                         "=" => 76,
854                         "(" => 77,
855                         "|" => 78,
856                         "." => 80,
857                         ">" => 81
858                 },
859                 DEFAULT => -107
860         },
861         {#State 108
862                 ACTIONS => {
863                         "-" => 68,
864                         ":" => 67,
865                         "<" => 70,
866                         "+" => 72,
867                         "~" => 71,
868                         "*" => 79,
869                         "?" => 69,
870                         "{" => 73,
871                         "&" => 74,
872                         "/" => 75,
873                         "=" => 76,
874                         "(" => 77,
875                         "|" => 78,
876                         "." => 80,
877                         ">" => 81
878                 },
879                 DEFAULT => -103
880         },
881         {#State 109
882                 ACTIONS => {
883                         "-" => 68,
884                         ":" => 67,
885                         "<" => 70,
886                         "+" => 72,
887                         "~" => 71,
888                         "*" => 79,
889                         "?" => 69,
890                         "{" => 73,
891                         "&" => 74,
892                         "/" => 75,
893                         "=" => 76,
894                         "(" => 77,
895                         "|" => 78,
896                         "." => 80,
897                         ">" => 81
898                 },
899                 DEFAULT => -111
900         },
901         {#State 110
902                 ACTIONS => {
903                         ":" => 67,
904                         "<" => 70,
905                         "~" => 71,
906                         "?" => 69,
907                         "{" => 73,
908                         "=" => 76
909                 },
910                 DEFAULT => -110
911         },
912         {#State 111
913                 ACTIONS => {
914                         "}" => 132,
915                         "," => 82
916                 }
917         },
918         {#State 112
919                 ACTIONS => {
920                         ":" => 67,
921                         "<" => 70,
922                         "~" => 71,
923                         "?" => 69,
924                         "{" => 73,
925                         "=" => 76
926                 },
927                 DEFAULT => -105
928         },
929         {#State 113
930                 ACTIONS => {
931                         ":" => 67,
932                         "<" => 70,
933                         "~" => 71,
934                         "?" => 69,
935                         "{" => 73,
936                         "=" => 76
937                 },
938                 DEFAULT => -106
939         },
940         {#State 114
941                 ACTIONS => {
942                         "-" => 68,
943                         ":" => 67,
944                         "<" => 70,
945                         "+" => 72,
946                         "~" => 71,
947                         "*" => 79,
948                         "?" => 69,
949                         "{" => 73,
950                         "&" => 74,
951                         "/" => 75,
952                         "=" => 76,
953                         "(" => 77,
954                         "|" => 78,
955                         "." => 80,
956                         ">" => 81
957                 },
958                 DEFAULT => -109
959         },
960         {#State 115
961                 ACTIONS => {
962                         "," => 82,
963                         ")" => 133
964                 }
965         },
966         {#State 116
967                 ACTIONS => {
968                         ":" => 67,
969                         "<" => 70,
970                         "~" => 71,
971                         "?" => 69,
972                         "{" => 73,
973                         "=" => 76
974                 },
975                 DEFAULT => -104
976         },
977         {#State 117
978                 ACTIONS => {
979                         ":" => 67,
980                         "<" => 70,
981                         "~" => 71,
982                         "?" => 69,
983                         "{" => 73,
984                         "=" => 76
985                 },
986                 DEFAULT => -101
987         },
988         {#State 118
989                 ACTIONS => {
990                         ":" => 67,
991                         "<" => 70,
992                         "~" => 71,
993                         "?" => 69,
994                         "{" => 73,
995                         "=" => 76
996                 },
997                 DEFAULT => -100
998         },
999         {#State 119
1000                 ACTIONS => {
1001                         ":" => 67,
1002                         "<" => 70,
1003                         "~" => 71,
1004                         "?" => 69,
1005                         "{" => 73,
1006                         "=" => 76
1007                 },
1008                 DEFAULT => -102
1009         },
1010         {#State 120
1011                 ACTIONS => {
1012                         "-" => 68,
1013                         ":" => 67,
1014                         "<" => 70,
1015                         "+" => 72,
1016                         "~" => 71,
1017                         "*" => 79,
1018                         "?" => 69,
1019                         "{" => 73,
1020                         "&" => 74,
1021                         "/" => 75,
1022                         "=" => 76,
1023                         "(" => 77,
1024                         "|" => 78,
1025                         "." => 80,
1026                         ">" => 81
1027                 },
1028                 DEFAULT => -94
1029         },
1030         {#State 121
1031                 DEFAULT => -15
1032         },
1033         {#State 122
1034                 DEFAULT => -16
1035         },
1036         {#State 123
1037                 ACTIONS => {
1038                         'IDENTIFIER' => 26
1039                 },
1040                 GOTOS => {
1041                         'identifier' => 134
1042                 }
1043         },
1044         {#State 124
1045                 DEFAULT => -116
1046         },
1047         {#State 125
1048                 ACTIONS => {
1049                         "{" => 136
1050                 },
1051                 DEFAULT => -70,
1052                 GOTOS => {
1053                         'union_body' => 137,
1054                         'opt_union_body' => 135
1055                 }
1056         },
1057         {#State 126
1058                 DEFAULT => -37
1059         },
1060         {#State 127
1061                 ACTIONS => {
1062                         "{" => 139
1063                 },
1064                 DEFAULT => -60,
1065                 GOTOS => {
1066                         'struct_body' => 138,
1067                         'opt_struct_body' => 140
1068                 }
1069         },
1070         {#State 128
1071                 ACTIONS => {
1072                         "{" => 141
1073                 },
1074                 DEFAULT => -43,
1075                 GOTOS => {
1076                         'opt_enum_body' => 143,
1077                         'enum_body' => 142
1078                 }
1079         },
1080         {#State 129
1081                 ACTIONS => {
1082                         "{" => 145
1083                 },
1084                 DEFAULT => -51,
1085                 GOTOS => {
1086                         'bitmap_body' => 146,
1087                         'opt_bitmap_body' => 144
1088                 }
1089         },
1090         {#State 130
1091                 ACTIONS => {
1092                         "(" => 147
1093                 }
1094         },
1095         {#State 131
1096                 ACTIONS => {
1097                         'IDENTIFIER' => 26,
1098                         "*" => 149
1099                 },
1100                 GOTOS => {
1101                         'identifier' => 148
1102                 }
1103         },
1104         {#State 132
1105                 ACTIONS => {
1106                         'CONSTANT' => 48,
1107                         'TEXT' => 16,
1108                         'IDENTIFIER' => 26
1109                 },
1110                 DEFAULT => -95,
1111                 GOTOS => {
1112                         'identifier' => 50,
1113                         'anytext' => 150,
1114                         'text' => 51,
1115                         'constant' => 47
1116                 }
1117         },
1118         {#State 133
1119                 ACTIONS => {
1120                         'CONSTANT' => 48,
1121                         'TEXT' => 16,
1122                         'IDENTIFIER' => 26
1123                 },
1124                 DEFAULT => -95,
1125                 GOTOS => {
1126                         'identifier' => 50,
1127                         'anytext' => 151,
1128                         'text' => 51,
1129                         'constant' => 47
1130                 }
1131         },
1132         {#State 134
1133                 ACTIONS => {
1134                         "[" => 152
1135                 },
1136                 DEFAULT => -84,
1137                 GOTOS => {
1138                         'array_len' => 153
1139                 }
1140         },
1141         {#State 135
1142                 DEFAULT => -72
1143         },
1144         {#State 136
1145                 DEFAULT => -67,
1146                 GOTOS => {
1147                         'union_elements' => 154
1148                 }
1149         },
1150         {#State 137
1151                 DEFAULT => -71
1152         },
1153         {#State 138
1154                 DEFAULT => -61
1155         },
1156         {#State 139
1157                 DEFAULT => -76,
1158                 GOTOS => {
1159                         'element_list1' => 155
1160                 }
1161         },
1162         {#State 140
1163                 DEFAULT => -62
1164         },
1165         {#State 141
1166                 ACTIONS => {
1167                         'IDENTIFIER' => 26
1168                 },
1169                 GOTOS => {
1170                         'identifier' => 156,
1171                         'enum_element' => 157,
1172                         'enum_elements' => 158
1173                 }
1174         },
1175         {#State 142
1176                 DEFAULT => -44
1177         },
1178         {#State 143
1179                 DEFAULT => -45
1180         },
1181         {#State 144
1182                 DEFAULT => -53
1183         },
1184         {#State 145
1185                 ACTIONS => {
1186                         'IDENTIFIER' => 26
1187                 },
1188                 DEFAULT => -56,
1189                 GOTOS => {
1190                         'identifier' => 161,
1191                         'bitmap_element' => 160,
1192                         'bitmap_elements' => 159,
1193                         'opt_bitmap_elements' => 162
1194                 }
1195         },
1196         {#State 146
1197                 DEFAULT => -52
1198         },
1199         {#State 147
1200                 ACTIONS => {
1201                         "," => -80,
1202                         "void" => 166,
1203                         "const" => 164,
1204                         ")" => -80
1205                 },
1206                 DEFAULT => -78,
1207                 GOTOS => {
1208                         'optional_const' => 163,
1209                         'element_list2' => 165
1210                 }
1211         },
1212         {#State 148
1213                 ACTIONS => {
1214                         "[" => 152,
1215                         "=" => 168
1216                 },
1217                 GOTOS => {
1218                         'array_len' => 167
1219                 }
1220         },
1221         {#State 149
1222                 DEFAULT => -75
1223         },
1224         {#State 150
1225                 ACTIONS => {
1226                         "-" => 68,
1227                         ":" => 67,
1228                         "<" => 70,
1229                         "+" => 72,
1230                         "~" => 71,
1231                         "*" => 79,
1232                         "?" => 69,
1233                         "{" => 73,
1234                         "&" => 74,
1235                         "/" => 75,
1236                         "=" => 76,
1237                         "(" => 77,
1238                         "|" => 78,
1239                         "." => 80,
1240                         ">" => 81
1241                 },
1242                 DEFAULT => -113
1243         },
1244         {#State 151
1245                 ACTIONS => {
1246                         ":" => 67,
1247                         "<" => 70,
1248                         "~" => 71,
1249                         "?" => 69,
1250                         "{" => 73,
1251                         "=" => 76
1252                 },
1253                 DEFAULT => -112
1254         },
1255         {#State 152
1256                 ACTIONS => {
1257                         'CONSTANT' => 48,
1258                         'TEXT' => 16,
1259                         "]" => 169,
1260                         'IDENTIFIER' => 26
1261                 },
1262                 DEFAULT => -95,
1263                 GOTOS => {
1264                         'identifier' => 50,
1265                         'anytext' => 170,
1266                         'text' => 51,
1267                         'constant' => 47
1268                 }
1269         },
1270         {#State 153
1271                 ACTIONS => {
1272                         ";" => 171
1273                 }
1274         },
1275         {#State 154
1276                 ACTIONS => {
1277                         "}" => 172
1278                 },
1279                 DEFAULT => -87,
1280                 GOTOS => {
1281                         'optional_base_element' => 174,
1282                         'property_list' => 173
1283                 }
1284         },
1285         {#State 155
1286                 ACTIONS => {
1287                         "}" => 175
1288                 },
1289                 DEFAULT => -87,
1290                 GOTOS => {
1291                         'base_element' => 176,
1292                         'property_list' => 177
1293                 }
1294         },
1295         {#State 156
1296                 ACTIONS => {
1297                         "=" => 178
1298                 },
1299                 DEFAULT => -48
1300         },
1301         {#State 157
1302                 DEFAULT => -46
1303         },
1304         {#State 158
1305                 ACTIONS => {
1306                         "}" => 179,
1307                         "," => 180
1308                 }
1309         },
1310         {#State 159
1311                 ACTIONS => {
1312                         "," => 181
1313                 },
1314                 DEFAULT => -57
1315         },
1316         {#State 160
1317                 DEFAULT => -54
1318         },
1319         {#State 161
1320                 ACTIONS => {
1321                         "=" => 182
1322                 }
1323         },
1324         {#State 162
1325                 ACTIONS => {
1326                         "}" => 183
1327                 }
1328         },
1329         {#State 163
1330                 DEFAULT => -87,
1331                 GOTOS => {
1332                         'base_element' => 184,
1333                         'property_list' => 177
1334                 }
1335         },
1336         {#State 164
1337                 DEFAULT => -79
1338         },
1339         {#State 165
1340                 ACTIONS => {
1341                         "," => 185,
1342                         ")" => 186
1343                 }
1344         },
1345         {#State 166
1346                 DEFAULT => -81
1347         },
1348         {#State 167
1349                 ACTIONS => {
1350                         "=" => 187
1351                 }
1352         },
1353         {#State 168
1354                 ACTIONS => {
1355                         'CONSTANT' => 48,
1356                         'TEXT' => 16,
1357                         'IDENTIFIER' => 26
1358                 },
1359                 DEFAULT => -95,
1360                 GOTOS => {
1361                         'identifier' => 50,
1362                         'anytext' => 188,
1363                         'text' => 51,
1364                         'constant' => 47
1365                 }
1366         },
1367         {#State 169
1368                 ACTIONS => {
1369                         "[" => 152
1370                 },
1371                 DEFAULT => -84,
1372                 GOTOS => {
1373                         'array_len' => 189
1374                 }
1375         },
1376         {#State 170
1377                 ACTIONS => {
1378                         "-" => 68,
1379                         ":" => 67,
1380                         "?" => 69,
1381                         "<" => 70,
1382                         "+" => 72,
1383                         "~" => 71,
1384                         "&" => 74,
1385                         "{" => 73,
1386                         "/" => 75,
1387                         "=" => 76,
1388                         "|" => 78,
1389                         "(" => 77,
1390                         "*" => 79,
1391                         "." => 80,
1392                         "]" => 190,
1393                         ">" => 81
1394                 }
1395         },
1396         {#State 171
1397                 DEFAULT => -29
1398         },
1399         {#State 172
1400                 DEFAULT => -69
1401         },
1402         {#State 173
1403                 ACTIONS => {
1404                         "[" => 20
1405                 },
1406                 DEFAULT => -87,
1407                 GOTOS => {
1408                         'base_or_empty' => 191,
1409                         'base_element' => 192,
1410                         'empty_element' => 193,
1411                         'property_list' => 194
1412                 }
1413         },
1414         {#State 174
1415                 DEFAULT => -68
1416         },
1417         {#State 175
1418                 DEFAULT => -59
1419         },
1420         {#State 176
1421                 ACTIONS => {
1422                         ";" => 195
1423                 }
1424         },
1425         {#State 177
1426                 ACTIONS => {
1427                         'IDENTIFIER' => 26,
1428                         "signed" => 98,
1429                         'void' => 92,
1430                         "unsigned" => 102,
1431                         "[" => 20
1432                 },
1433                 DEFAULT => -87,
1434                 GOTOS => {
1435                         'existingtype' => 99,
1436                         'bitmap' => 56,
1437                         'usertype' => 94,
1438                         'property_list' => 93,
1439                         'identifier' => 95,
1440                         'struct' => 61,
1441                         'enum' => 64,
1442                         'type' => 196,
1443                         'union' => 66,
1444                         'sign' => 96
1445                 }
1446         },
1447         {#State 178
1448                 ACTIONS => {
1449                         'CONSTANT' => 48,
1450                         'TEXT' => 16,
1451                         'IDENTIFIER' => 26
1452                 },
1453                 DEFAULT => -95,
1454                 GOTOS => {
1455                         'identifier' => 50,
1456                         'anytext' => 197,
1457                         'text' => 51,
1458                         'constant' => 47
1459                 }
1460         },
1461         {#State 179
1462                 DEFAULT => -42
1463         },
1464         {#State 180
1465                 ACTIONS => {
1466                         'IDENTIFIER' => 26
1467                 },
1468                 GOTOS => {
1469                         'identifier' => 156,
1470                         'enum_element' => 198
1471                 }
1472         },
1473         {#State 181
1474                 ACTIONS => {
1475                         'IDENTIFIER' => 26
1476                 },
1477                 GOTOS => {
1478                         'identifier' => 161,
1479                         'bitmap_element' => 199
1480                 }
1481         },
1482         {#State 182
1483                 ACTIONS => {
1484                         'CONSTANT' => 48,
1485                         'TEXT' => 16,
1486                         'IDENTIFIER' => 26
1487                 },
1488                 DEFAULT => -95,
1489                 GOTOS => {
1490                         'identifier' => 50,
1491                         'anytext' => 200,
1492                         'text' => 51,
1493                         'constant' => 47
1494                 }
1495         },
1496         {#State 183
1497                 DEFAULT => -50
1498         },
1499         {#State 184
1500                 DEFAULT => -82
1501         },
1502         {#State 185
1503                 ACTIONS => {
1504                         "const" => 164
1505                 },
1506                 DEFAULT => -78,
1507                 GOTOS => {
1508                         'optional_const' => 201
1509                 }
1510         },
1511         {#State 186
1512                 ACTIONS => {
1513                         ";" => 202
1514                 }
1515         },
1516         {#State 187
1517                 ACTIONS => {
1518                         'CONSTANT' => 48,
1519                         'TEXT' => 16,
1520                         'IDENTIFIER' => 26
1521                 },
1522                 DEFAULT => -95,
1523                 GOTOS => {
1524                         'identifier' => 50,
1525                         'anytext' => 203,
1526                         'text' => 51,
1527                         'constant' => 47
1528                 }
1529         },
1530         {#State 188
1531                 ACTIONS => {
1532                         "-" => 68,
1533                         ":" => 67,
1534                         "?" => 69,
1535                         "<" => 70,
1536                         ";" => 204,
1537                         "+" => 72,
1538                         "~" => 71,
1539                         "&" => 74,
1540                         "{" => 73,
1541                         "/" => 75,
1542                         "=" => 76,
1543                         "|" => 78,
1544                         "(" => 77,
1545                         "*" => 79,
1546                         "." => 80,
1547                         ">" => 81
1548                 }
1549         },
1550         {#State 189
1551                 DEFAULT => -85
1552         },
1553         {#State 190
1554                 ACTIONS => {
1555                         "[" => 152
1556                 },
1557                 DEFAULT => -84,
1558                 GOTOS => {
1559                         'array_len' => 205
1560                 }
1561         },
1562         {#State 191
1563                 DEFAULT => -66
1564         },
1565         {#State 192
1566                 ACTIONS => {
1567                         ";" => 206
1568                 }
1569         },
1570         {#State 193
1571                 DEFAULT => -65
1572         },
1573         {#State 194
1574                 ACTIONS => {
1575                         'IDENTIFIER' => 26,
1576                         "signed" => 98,
1577                         ";" => 207,
1578                         'void' => 92,
1579                         "unsigned" => 102,
1580                         "[" => 20
1581                 },
1582                 DEFAULT => -87,
1583                 GOTOS => {
1584                         'existingtype' => 99,
1585                         'bitmap' => 56,
1586                         'usertype' => 94,
1587                         'property_list' => 93,
1588                         'identifier' => 95,
1589                         'struct' => 61,
1590                         'enum' => 64,
1591                         'type' => 196,
1592                         'union' => 66,
1593                         'sign' => 96
1594                 }
1595         },
1596         {#State 195
1597                 DEFAULT => -77
1598         },
1599         {#State 196
1600                 DEFAULT => -74,
1601                 GOTOS => {
1602                         'pointers' => 208
1603                 }
1604         },
1605         {#State 197
1606                 ACTIONS => {
1607                         "-" => 68,
1608                         ":" => 67,
1609                         "<" => 70,
1610                         "+" => 72,
1611                         "~" => 71,
1612                         "*" => 79,
1613                         "?" => 69,
1614                         "{" => 73,
1615                         "&" => 74,
1616                         "/" => 75,
1617                         "=" => 76,
1618                         "(" => 77,
1619                         "|" => 78,
1620                         "." => 80,
1621                         ">" => 81
1622                 },
1623                 DEFAULT => -49
1624         },
1625         {#State 198
1626                 DEFAULT => -47
1627         },
1628         {#State 199
1629                 DEFAULT => -55
1630         },
1631         {#State 200
1632                 ACTIONS => {
1633                         "-" => 68,
1634                         ":" => 67,
1635                         "<" => 70,
1636                         "+" => 72,
1637                         "~" => 71,
1638                         "*" => 79,
1639                         "?" => 69,
1640                         "{" => 73,
1641                         "&" => 74,
1642                         "/" => 75,
1643                         "=" => 76,
1644                         "(" => 77,
1645                         "|" => 78,
1646                         "." => 80,
1647                         ">" => 81
1648                 },
1649                 DEFAULT => -58
1650         },
1651         {#State 201
1652                 DEFAULT => -87,
1653                 GOTOS => {
1654                         'base_element' => 209,
1655                         'property_list' => 177
1656                 }
1657         },
1658         {#State 202
1659                 DEFAULT => -28
1660         },
1661         {#State 203
1662                 ACTIONS => {
1663                         "-" => 68,
1664                         ":" => 67,
1665                         "?" => 69,
1666                         "<" => 70,
1667                         ";" => 210,
1668                         "+" => 72,
1669                         "~" => 71,
1670                         "&" => 74,
1671                         "{" => 73,
1672                         "/" => 75,
1673                         "=" => 76,
1674                         "|" => 78,
1675                         "(" => 77,
1676                         "*" => 79,
1677                         "." => 80,
1678                         ">" => 81
1679                 }
1680         },
1681         {#State 204
1682                 DEFAULT => -26
1683         },
1684         {#State 205
1685                 DEFAULT => -86
1686         },
1687         {#State 206
1688                 DEFAULT => -64
1689         },
1690         {#State 207
1691                 DEFAULT => -63
1692         },
1693         {#State 208
1694                 ACTIONS => {
1695                         'IDENTIFIER' => 26,
1696                         "*" => 149
1697                 },
1698                 GOTOS => {
1699                         'identifier' => 211
1700                 }
1701         },
1702         {#State 209
1703                 DEFAULT => -83
1704         },
1705         {#State 210
1706                 DEFAULT => -27
1707         },
1708         {#State 211
1709                 ACTIONS => {
1710                         "[" => 152
1711                 },
1712                 DEFAULT => -84,
1713                 GOTOS => {
1714                         'array_len' => 212
1715                 }
1716         },
1717         {#State 212
1718                 DEFAULT => -73
1719         }
1720 ],
1721                                   yyrules  =>
1722 [
1723         [#Rule 0
1724                  '$start', 2, undef
1725         ],
1726         [#Rule 1
1727                  'idl', 0, undef
1728         ],
1729         [#Rule 2
1730                  'idl', 2,
1731 sub
1732 #line 20 "./../pidl/idl.yp"
1733 { push(@{$_[1]}, $_[2]); $_[1] }
1734         ],
1735         [#Rule 3
1736                  'idl', 2,
1737 sub
1738 #line 22 "./../pidl/idl.yp"
1739 { push(@{$_[1]}, $_[2]); $_[1] }
1740         ],
1741         [#Rule 4
1742                  'idl', 2,
1743 sub
1744 #line 24 "./../pidl/idl.yp"
1745 { push(@{$_[1]}, $_[2]); $_[1] }
1746         ],
1747         [#Rule 5
1748                  'idl', 2,
1749 sub
1750 #line 26 "./../pidl/idl.yp"
1751 { push(@{$_[1]}, $_[2]); $_[1] }
1752         ],
1753         [#Rule 6
1754                  'idl', 2,
1755 sub
1756 #line 28 "./../pidl/idl.yp"
1757 { push(@{$_[1]}, $_[2]); $_[1] }
1758         ],
1759         [#Rule 7
1760                  'idl', 2,
1761 sub
1762 #line 30 "./../pidl/idl.yp"
1763 { push(@{$_[1]}, $_[2]); $_[1] }
1764         ],
1765         [#Rule 8
1766                  'import', 3,
1767 sub
1768 #line 35 "./../pidl/idl.yp"
1769 {{
1770                 "TYPE" => "IMPORT",
1771                 "PATHS" => $_[2],
1772                 "FILE" => $_[0]->YYData->{FILE},
1773                 "LINE" => $_[0]->YYData->{LINE},
1774         }}
1775         ],
1776         [#Rule 9
1777                  'include', 3,
1778 sub
1779 #line 45 "./../pidl/idl.yp"
1780 {{
1781                 "TYPE" => "INCLUDE",
1782                 "PATHS" => $_[2],
1783                 "FILE" => $_[0]->YYData->{FILE},
1784                 "LINE" => $_[0]->YYData->{LINE},
1785         }}
1786         ],
1787         [#Rule 10
1788                  'importlib', 3,
1789 sub
1790 #line 55 "./../pidl/idl.yp"
1791 {{
1792                 "TYPE" => "IMPORTLIB",
1793                 "PATHS" => $_[2],
1794                 "FILE" => $_[0]->YYData->{FILE},
1795                 "LINE" => $_[0]->YYData->{LINE},
1796         }}
1797         ],
1798         [#Rule 11
1799                  'commalist', 1,
1800 sub
1801 #line 64 "./../pidl/idl.yp"
1802 { [ $_[1] ] }
1803         ],
1804         [#Rule 12
1805                  'commalist', 3,
1806 sub
1807 #line 66 "./../pidl/idl.yp"
1808 { push(@{$_[1]}, $_[3]); $_[1] }
1809         ],
1810         [#Rule 13
1811                  'coclass', 7,
1812 sub
1813 #line 71 "./../pidl/idl.yp"
1814 {{
1815                 "TYPE" => "COCLASS",
1816                 "PROPERTIES" => $_[1],
1817                 "NAME" => $_[3],
1818                 "DATA" => $_[5],
1819                 "FILE" => $_[0]->YYData->{FILE},
1820                 "LINE" => $_[0]->YYData->{LINE},
1821         }}
1822         ],
1823         [#Rule 14
1824                  'interface_names', 0, undef
1825         ],
1826         [#Rule 15
1827                  'interface_names', 4,
1828 sub
1829 #line 84 "./../pidl/idl.yp"
1830 { push(@{$_[1]}, $_[2]); $_[1] }
1831         ],
1832         [#Rule 16
1833                  'interface', 8,
1834 sub
1835 #line 89 "./../pidl/idl.yp"
1836 {{
1837                 "TYPE" => "INTERFACE",
1838                 "PROPERTIES" => $_[1],
1839                 "NAME" => $_[3],
1840                 "BASE" => $_[4],
1841                 "DATA" => $_[6],
1842                 "FILE" => $_[0]->YYData->{FILE},
1843                 "LINE" => $_[0]->YYData->{LINE},
1844         }}
1845         ],
1846         [#Rule 17
1847                  'base_interface', 0, undef
1848         ],
1849         [#Rule 18
1850                  'base_interface', 2,
1851 sub
1852 #line 103 "./../pidl/idl.yp"
1853 { $_[2] }
1854         ],
1855         [#Rule 19
1856                  'cpp_quote', 4,
1857 sub
1858 #line 109 "./../pidl/idl.yp"
1859 {{
1860                  "TYPE" => "CPP_QUOTE",
1861                  "DATA" => $_[3],
1862                  "FILE" => $_[0]->YYData->{FILE},
1863                  "LINE" => $_[0]->YYData->{LINE},
1864         }}
1865         ],
1866         [#Rule 20
1867                  'definitions', 1,
1868 sub
1869 #line 118 "./../pidl/idl.yp"
1870 { [ $_[1] ] }
1871         ],
1872         [#Rule 21
1873                  'definitions', 2,
1874 sub
1875 #line 120 "./../pidl/idl.yp"
1876 { push(@{$_[1]}, $_[2]); $_[1] }
1877         ],
1878         [#Rule 22
1879                  'definition', 1, undef
1880         ],
1881         [#Rule 23
1882                  'definition', 1, undef
1883         ],
1884         [#Rule 24
1885                  'definition', 1, undef
1886         ],
1887         [#Rule 25
1888                  'definition', 1, undef
1889         ],
1890         [#Rule 26
1891                  'const', 7,
1892 sub
1893 #line 135 "./../pidl/idl.yp"
1894 {{
1895                 "TYPE"  => "CONST",
1896                 "DTYPE"  => $_[2],
1897                 "POINTERS" => $_[3],
1898                 "NAME"  => $_[4],
1899                 "VALUE" => $_[6],
1900                 "FILE" => $_[0]->YYData->{FILE},
1901                 "LINE" => $_[0]->YYData->{LINE},
1902         }}
1903         ],
1904         [#Rule 27
1905                  'const', 8,
1906 sub
1907 #line 146 "./../pidl/idl.yp"
1908 {{
1909                 "TYPE"  => "CONST",
1910                 "DTYPE"  => $_[2],
1911                 "POINTERS" => $_[3],
1912                 "NAME"  => $_[4],
1913                 "ARRAY_LEN" => $_[5],
1914                 "VALUE" => $_[7],
1915                 "FILE" => $_[0]->YYData->{FILE},
1916                 "LINE" => $_[0]->YYData->{LINE},
1917         }}
1918         ],
1919         [#Rule 28
1920                  'function', 7,
1921 sub
1922 #line 160 "./../pidl/idl.yp"
1923 {{
1924                 "TYPE" => "FUNCTION",
1925                 "NAME" => $_[3],
1926                 "RETURN_TYPE" => $_[2],
1927                 "PROPERTIES" => $_[1],
1928                 "ELEMENTS" => $_[5],
1929                 "FILE" => $_[0]->YYData->{FILE},
1930                 "LINE" => $_[0]->YYData->{LINE},
1931         }}
1932         ],
1933         [#Rule 29
1934                  'typedef', 6,
1935 sub
1936 #line 173 "./../pidl/idl.yp"
1937 {{
1938                 "TYPE" => "TYPEDEF",
1939                 "PROPERTIES" => $_[1],
1940                 "NAME" => $_[4],
1941                 "DATA" => $_[3],
1942                 "ARRAY_LEN" => $_[5],
1943                 "FILE" => $_[0]->YYData->{FILE},
1944                 "LINE" => $_[0]->YYData->{LINE},
1945         }}
1946         ],
1947         [#Rule 30
1948                  'usertype', 1, undef
1949         ],
1950         [#Rule 31
1951                  'usertype', 1, undef
1952         ],
1953         [#Rule 32
1954                  'usertype', 1, undef
1955         ],
1956         [#Rule 33
1957                  'usertype', 1, undef
1958         ],
1959         [#Rule 34
1960                  'typedecl', 2,
1961 sub
1962 #line 195 "./../pidl/idl.yp"
1963 { $_[1] }
1964         ],
1965         [#Rule 35
1966                  'sign', 1, undef
1967         ],
1968         [#Rule 36
1969                  'sign', 1, undef
1970         ],
1971         [#Rule 37
1972                  'existingtype', 2,
1973 sub
1974 #line 205 "./../pidl/idl.yp"
1975 { ($_[1]?$_[1]:"signed") ." $_[2]" }
1976         ],
1977         [#Rule 38
1978                  'existingtype', 1, undef
1979         ],
1980         [#Rule 39
1981                  'type', 1, undef
1982         ],
1983         [#Rule 40
1984                  'type', 1, undef
1985         ],
1986         [#Rule 41
1987                  'type', 1,
1988 sub
1989 #line 215 "./../pidl/idl.yp"
1990 { "void" }
1991         ],
1992         [#Rule 42
1993                  'enum_body', 3,
1994 sub
1995 #line 219 "./../pidl/idl.yp"
1996 { $_[2] }
1997         ],
1998         [#Rule 43
1999                  'opt_enum_body', 0, undef
2000         ],
2001         [#Rule 44
2002                  'opt_enum_body', 1, undef
2003         ],
2004         [#Rule 45
2005                  'enum', 4,
2006 sub
2007 #line 230 "./../pidl/idl.yp"
2008 {{
2009                 "TYPE" => "ENUM",
2010                 "PROPERTIES" => $_[1],
2011                 "NAME" => $_[3],
2012                 "ELEMENTS" => $_[4],
2013                 "FILE" => $_[0]->YYData->{FILE},
2014                 "LINE" => $_[0]->YYData->{LINE},
2015         }}
2016         ],
2017         [#Rule 46
2018                  'enum_elements', 1,
2019 sub
2020 #line 241 "./../pidl/idl.yp"
2021 { [ $_[1] ] }
2022         ],
2023         [#Rule 47
2024                  'enum_elements', 3,
2025 sub
2026 #line 243 "./../pidl/idl.yp"
2027 { push(@{$_[1]}, $_[3]); $_[1] }
2028         ],
2029         [#Rule 48
2030                  'enum_element', 1, undef
2031         ],
2032         [#Rule 49
2033                  'enum_element', 3,
2034 sub
2035 #line 249 "./../pidl/idl.yp"
2036 { "$_[1]$_[2]$_[3]" }
2037         ],
2038         [#Rule 50
2039                  'bitmap_body', 3,
2040 sub
2041 #line 253 "./../pidl/idl.yp"
2042 { $_[2] }
2043         ],
2044         [#Rule 51
2045                  'opt_bitmap_body', 0, undef
2046         ],
2047         [#Rule 52
2048                  'opt_bitmap_body', 1, undef
2049         ],
2050         [#Rule 53
2051                  'bitmap', 4,
2052 sub
2053 #line 264 "./../pidl/idl.yp"
2054 {{
2055                 "TYPE" => "BITMAP",
2056                 "PROPERTIES" => $_[1],
2057                 "NAME" => $_[3],
2058                 "ELEMENTS" => $_[4],
2059                 "FILE" => $_[0]->YYData->{FILE},
2060                 "LINE" => $_[0]->YYData->{LINE},
2061         }}
2062         ],
2063         [#Rule 54
2064                  'bitmap_elements', 1,
2065 sub
2066 #line 275 "./../pidl/idl.yp"
2067 { [ $_[1] ] }
2068         ],
2069         [#Rule 55
2070                  'bitmap_elements', 3,
2071 sub
2072 #line 277 "./../pidl/idl.yp"
2073 { push(@{$_[1]}, $_[3]); $_[1] }
2074         ],
2075         [#Rule 56
2076                  'opt_bitmap_elements', 0, undef
2077         ],
2078         [#Rule 57
2079                  'opt_bitmap_elements', 1, undef
2080         ],
2081         [#Rule 58
2082                  'bitmap_element', 3,
2083 sub
2084 #line 287 "./../pidl/idl.yp"
2085 { "$_[1] ( $_[3] )" }
2086         ],
2087         [#Rule 59
2088                  'struct_body', 3,
2089 sub
2090 #line 291 "./../pidl/idl.yp"
2091 { $_[2] }
2092         ],
2093         [#Rule 60
2094                  'opt_struct_body', 0, undef
2095         ],
2096         [#Rule 61
2097                  'opt_struct_body', 1, undef
2098         ],
2099         [#Rule 62
2100                  'struct', 4,
2101 sub
2102 #line 302 "./../pidl/idl.yp"
2103 {{
2104                 "TYPE" => "STRUCT",
2105                 "PROPERTIES" => $_[1],
2106                 "NAME" => $_[3],
2107                 "ELEMENTS" => $_[4],
2108                 "FILE" => $_[0]->YYData->{FILE},
2109                 "LINE" => $_[0]->YYData->{LINE},
2110         }}
2111         ],
2112         [#Rule 63
2113                  'empty_element', 2,
2114 sub
2115 #line 314 "./../pidl/idl.yp"
2116 {{
2117                 "NAME" => "",
2118                 "TYPE" => "EMPTY",
2119                 "PROPERTIES" => $_[1],
2120                 "POINTERS" => 0,
2121                 "ARRAY_LEN" => [],
2122                 "FILE" => $_[0]->YYData->{FILE},
2123                 "LINE" => $_[0]->YYData->{LINE},
2124         }}
2125         ],
2126         [#Rule 64
2127                  'base_or_empty', 2, undef
2128         ],
2129         [#Rule 65
2130                  'base_or_empty', 1, undef
2131         ],
2132         [#Rule 66
2133                  'optional_base_element', 2,
2134 sub
2135 #line 331 "./../pidl/idl.yp"
2136 { $_[2]->{PROPERTIES} = FlattenHash([$_[1],$_[2]->{PROPERTIES}]); $_[2] }
2137         ],
2138         [#Rule 67
2139                  'union_elements', 0, undef
2140         ],
2141         [#Rule 68
2142                  'union_elements', 2,
2143 sub
2144 #line 337 "./../pidl/idl.yp"
2145 { push(@{$_[1]}, $_[2]); $_[1] }
2146         ],
2147         [#Rule 69
2148                  'union_body', 3,
2149 sub
2150 #line 341 "./../pidl/idl.yp"
2151 { $_[2] }
2152         ],
2153         [#Rule 70
2154                  'opt_union_body', 0, undef
2155         ],
2156         [#Rule 71
2157                  'opt_union_body', 1, undef
2158         ],
2159         [#Rule 72
2160                  'union', 4,
2161 sub
2162 #line 352 "./../pidl/idl.yp"
2163 {{
2164                 "TYPE" => "UNION",
2165                 "PROPERTIES" => $_[1],
2166                 "NAME" => $_[3],
2167                 "ELEMENTS" => $_[4],
2168                 "FILE" => $_[0]->YYData->{FILE},
2169                 "LINE" => $_[0]->YYData->{LINE},
2170         }}
2171         ],
2172         [#Rule 73
2173                  'base_element', 5,
2174 sub
2175 #line 364 "./../pidl/idl.yp"
2176 {{
2177                 "NAME" => $_[4],
2178                 "TYPE" => $_[2],
2179                 "PROPERTIES" => $_[1],
2180                 "POINTERS" => $_[3],
2181                 "ARRAY_LEN" => $_[5],
2182                 "FILE" => $_[0]->YYData->{FILE},
2183                 "LINE" => $_[0]->YYData->{LINE},
2184         }}
2185         ],
2186         [#Rule 74
2187                  'pointers', 0,
2188 sub
2189 #line 377 "./../pidl/idl.yp"
2190 { 0 }
2191         ],
2192         [#Rule 75
2193                  'pointers', 2,
2194 sub
2195 #line 379 "./../pidl/idl.yp"
2196 { $_[1]+1 }
2197         ],
2198         [#Rule 76
2199                  'element_list1', 0,
2200 sub
2201 #line 384 "./../pidl/idl.yp"
2202 { [] }
2203         ],
2204         [#Rule 77
2205                  'element_list1', 3,
2206 sub
2207 #line 386 "./../pidl/idl.yp"
2208 { push(@{$_[1]}, $_[2]); $_[1] }
2209         ],
2210         [#Rule 78
2211                  'optional_const', 0, undef
2212         ],
2213         [#Rule 79
2214                  'optional_const', 1, undef
2215         ],
2216         [#Rule 80
2217                  'element_list2', 0, undef
2218         ],
2219         [#Rule 81
2220                  'element_list2', 1, undef
2221         ],
2222         [#Rule 82
2223                  'element_list2', 2,
2224 sub
2225 #line 400 "./../pidl/idl.yp"
2226 { [ $_[2] ] }
2227         ],
2228         [#Rule 83
2229                  'element_list2', 4,
2230 sub
2231 #line 402 "./../pidl/idl.yp"
2232 { push(@{$_[1]}, $_[4]); $_[1] }
2233         ],
2234         [#Rule 84
2235                  'array_len', 0, undef
2236         ],
2237         [#Rule 85
2238                  'array_len', 3,
2239 sub
2240 #line 408 "./../pidl/idl.yp"
2241 { push(@{$_[3]}, "*"); $_[3] }
2242         ],
2243         [#Rule 86
2244                  'array_len', 4,
2245 sub
2246 #line 410 "./../pidl/idl.yp"
2247 { push(@{$_[4]}, "$_[2]"); $_[4] }
2248         ],
2249         [#Rule 87
2250                  'property_list', 0, undef
2251         ],
2252         [#Rule 88
2253                  'property_list', 4,
2254 sub
2255 #line 416 "./../pidl/idl.yp"
2256 { FlattenHash([$_[1],$_[3]]); }
2257         ],
2258         [#Rule 89
2259                  'properties', 1,
2260 sub
2261 #line 420 "./../pidl/idl.yp"
2262 { $_[1] }
2263         ],
2264         [#Rule 90
2265                  'properties', 3,
2266 sub
2267 #line 422 "./../pidl/idl.yp"
2268 { FlattenHash([$_[1], $_[3]]); }
2269         ],
2270         [#Rule 91
2271                  'property', 1,
2272 sub
2273 #line 426 "./../pidl/idl.yp"
2274 {{ "$_[1]" => "1"     }}
2275         ],
2276         [#Rule 92
2277                  'property', 4,
2278 sub
2279 #line 428 "./../pidl/idl.yp"
2280 {{ "$_[1]" => "$_[3]" }}
2281         ],
2282         [#Rule 93
2283                  'commalisttext', 1, undef
2284         ],
2285         [#Rule 94
2286                  'commalisttext', 3,
2287 sub
2288 #line 434 "./../pidl/idl.yp"
2289 { "$_[1],$_[3]" }
2290         ],
2291         [#Rule 95
2292                  'anytext', 0,
2293 sub
2294 #line 439 "./../pidl/idl.yp"
2295 { "" }
2296         ],
2297         [#Rule 96
2298                  'anytext', 1, undef
2299         ],
2300         [#Rule 97
2301                  'anytext', 1, undef
2302         ],
2303         [#Rule 98
2304                  'anytext', 1, undef
2305         ],
2306         [#Rule 99
2307                  'anytext', 3,
2308 sub
2309 #line 447 "./../pidl/idl.yp"
2310 { "$_[1]$_[2]$_[3]" }
2311         ],
2312         [#Rule 100
2313                  'anytext', 3,
2314 sub
2315 #line 449 "./../pidl/idl.yp"
2316 { "$_[1]$_[2]$_[3]" }
2317         ],
2318         [#Rule 101
2319                  'anytext', 3,
2320 sub
2321 #line 451 "./../pidl/idl.yp"
2322 { "$_[1]$_[2]$_[3]" }
2323         ],
2324         [#Rule 102
2325                  'anytext', 3,
2326 sub
2327 #line 453 "./../pidl/idl.yp"
2328 { "$_[1]$_[2]$_[3]" }
2329         ],
2330         [#Rule 103
2331                  'anytext', 3,
2332 sub
2333 #line 455 "./../pidl/idl.yp"
2334 { "$_[1]$_[2]$_[3]" }
2335         ],
2336         [#Rule 104
2337                  'anytext', 3,
2338 sub
2339 #line 457 "./../pidl/idl.yp"
2340 { "$_[1]$_[2]$_[3]" }
2341         ],
2342         [#Rule 105
2343                  'anytext', 3,
2344 sub
2345 #line 459 "./../pidl/idl.yp"
2346 { "$_[1]$_[2]$_[3]" }
2347         ],
2348         [#Rule 106
2349                  'anytext', 3,
2350 sub
2351 #line 461 "./../pidl/idl.yp"
2352 { "$_[1]$_[2]$_[3]" }
2353         ],
2354         [#Rule 107
2355                  'anytext', 3,
2356 sub
2357 #line 463 "./../pidl/idl.yp"
2358 { "$_[1]$_[2]$_[3]" }
2359         ],
2360         [#Rule 108
2361                  'anytext', 3,
2362 sub
2363 #line 465 "./../pidl/idl.yp"
2364 { "$_[1]$_[2]$_[3]" }
2365         ],
2366         [#Rule 109
2367                  'anytext', 3,
2368 sub
2369 #line 467 "./../pidl/idl.yp"
2370 { "$_[1]$_[2]$_[3]" }
2371         ],
2372         [#Rule 110
2373                  'anytext', 3,
2374 sub
2375 #line 469 "./../pidl/idl.yp"
2376 { "$_[1]$_[2]$_[3]" }
2377         ],
2378         [#Rule 111
2379                  'anytext', 3,
2380 sub
2381 #line 471 "./../pidl/idl.yp"
2382 { "$_[1]$_[2]$_[3]" }
2383         ],
2384         [#Rule 112
2385                  'anytext', 5,
2386 sub
2387 #line 473 "./../pidl/idl.yp"
2388 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2389         ],
2390         [#Rule 113
2391                  'anytext', 5,
2392 sub
2393 #line 475 "./../pidl/idl.yp"
2394 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2395         ],
2396         [#Rule 114
2397                  'identifier', 1, undef
2398         ],
2399         [#Rule 115
2400                  'optional_identifier', 0, undef
2401         ],
2402         [#Rule 116
2403                  'optional_identifier', 1, undef
2404         ],
2405         [#Rule 117
2406                  'constant', 1, undef
2407         ],
2408         [#Rule 118
2409                  'text', 1,
2410 sub
2411 #line 493 "./../pidl/idl.yp"
2412 { "\"$_[1]\"" }
2413         ],
2414         [#Rule 119
2415                  'optional_semicolon', 0, undef
2416         ],
2417         [#Rule 120
2418                  'optional_semicolon', 1, undef
2419         ]
2420 ],
2421                                   @_);
2422     bless($self,$class);
2423 }
2424
2425 #line 505 "./../pidl/idl.yp"
2426
2427
2428 use Parse::Pidl qw(error);
2429
2430 #####################################################################
2431 # flatten an array of hashes into a single hash
2432 sub FlattenHash($)
2433 {
2434         my $a = shift;
2435         my %b;
2436         for my $d (@{$a}) {
2437                 for my $k (keys %{$d}) {
2438                 $b{$k} = $d->{$k};
2439                 }
2440         }
2441         return \%b;
2442 }
2443
2444 #####################################################################
2445 # traverse a perl data structure removing any empty arrays or
2446 # hashes and any hash elements that map to undef
2447 sub CleanData($)
2448 {
2449         sub CleanData($);
2450         my($v) = shift;
2451
2452         return undef if (not defined($v));
2453
2454         if (ref($v) eq "ARRAY") {
2455                 foreach my $i (0 .. $#{$v}) {
2456                         CleanData($v->[$i]);
2457                 }
2458                 # this removes any undefined elements from the array
2459                 @{$v} = grep { defined $_ } @{$v};
2460         } elsif (ref($v) eq "HASH") {
2461                 foreach my $x (keys %{$v}) {
2462                         CleanData($v->{$x});
2463                         if (!defined $v->{$x}) {
2464                                 delete($v->{$x});
2465                                 next;
2466                         }
2467                 }
2468         }
2469
2470         return $v;
2471 }
2472
2473 sub _Error {
2474         if (exists $_[0]->YYData->{ERRMSG}) {
2475                 error($_[0]->YYData, $_[0]->YYData->{ERRMSG});
2476                 delete $_[0]->YYData->{ERRMSG};
2477                 return;
2478         }
2479
2480         my $last_token = $_[0]->YYData->{LAST_TOKEN};
2481
2482         error($_[0]->YYData, "Syntax error near '$last_token'");
2483 }
2484
2485 sub _Lexer($)
2486 {
2487         my($parser)=shift;
2488
2489         $parser->YYData->{INPUT} or return('',undef);
2490
2491 again:
2492         $parser->YYData->{INPUT} =~ s/^[ \t]*//;
2493
2494         for ($parser->YYData->{INPUT}) {
2495                 if (/^\#/) {
2496                         if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
2497                                 $parser->YYData->{LINE} = $1-1;
2498                                 $parser->YYData->{FILE} = $2;
2499                                 goto again;
2500                         }
2501                         if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
2502                                 $parser->YYData->{LINE} = $1-1;
2503                                 $parser->YYData->{FILE} = $2;
2504                                 goto again;
2505                         }
2506                         if (s/^(\#.*)$//m) {
2507                                 goto again;
2508                         }
2509                 }
2510                 if (s/^(\n)//) {
2511                         $parser->YYData->{LINE}++;
2512                         goto again;
2513                 }
2514                 if (s/^\"(.*?)\"//) {
2515                         $parser->YYData->{LAST_TOKEN} = $1;
2516                         return('TEXT',$1);
2517                 }
2518                 if (s/^(\d+)(\W|$)/$2/) {
2519                         $parser->YYData->{LAST_TOKEN} = $1;
2520                         return('CONSTANT',$1);
2521                 }
2522                 if (s/^([\w_]+)//) {
2523                         $parser->YYData->{LAST_TOKEN} = $1;
2524                         if ($1 =~
2525                             /^(coclass|interface|import|importlib
2526                               |include|cpp_quote|typedef
2527                               |union|struct|enum|bitmap
2528                               |void|const|unsigned|signed)$/x) {
2529                                 return $1;
2530                         }
2531                         return('IDENTIFIER',$1);
2532                 }
2533                 if (s/^(.)//s) {
2534                         $parser->YYData->{LAST_TOKEN} = $1;
2535                         return($1,$1);
2536                 }
2537         }
2538 }
2539
2540 sub parse_string
2541 {
2542         my ($data,$filename) = @_;
2543
2544         my $self = new Parse::Pidl::IDL;
2545
2546         $self->YYData->{FILE} = $filename;
2547         $self->YYData->{INPUT} = $data;
2548         $self->YYData->{LINE} = 0;
2549         $self->YYData->{LAST_TOKEN} = "NONE";
2550
2551         my $idl = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error );
2552
2553         return CleanData($idl);
2554 }
2555
2556 sub parse_file($$)
2557 {
2558         my ($filename,$incdirs) = @_;
2559
2560         my $saved_delim = $/;
2561         undef $/;
2562         my $cpp = $ENV{CPP};
2563         if (! defined $cpp) {
2564                 $cpp = "cpp";
2565         }
2566         my $includes = join('',map { " -I$_" } @$incdirs);
2567         my $data = `$cpp -D__PIDL__$includes -xc $filename`;
2568         $/ = $saved_delim;
2569
2570         return parse_string($data, $filename);
2571 }
2572
2573 1;