Fix errornos assumption that all compilers are gcc
[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 => -85,
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 => -116
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 => -112
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 => -89
214         },
215         {#State 31
216                 DEFAULT => -87
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 => -86
260         },
261         {#State 41
262                 ACTIONS => {
263                         'CONSTANT' => 48,
264                         'TEXT' => 16,
265                         'IDENTIFIER' => 26
266                 },
267                 DEFAULT => -93,
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 => -85,
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 => -88
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 => -91
327         },
328         {#State 47
329                 DEFAULT => -95
330         },
331         {#State 48
332                 DEFAULT => -115
333         },
334         {#State 49
335                 ACTIONS => {
336                         "," => 82,
337                         ")" => 83
338                 }
339         },
340         {#State 50
341                 DEFAULT => -94
342         },
343         {#State 51
344                 DEFAULT => -96
345         },
346         {#State 52
347                 ACTIONS => {
348                         ";" => 85
349                 },
350                 DEFAULT => -117,
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 => -85,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
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 => -93,
668                 GOTOS => {
669                         'identifier' => 50,
670                         'anytext' => 120,
671                         'text' => 51,
672                         'constant' => 47
673                 }
674         },
675         {#State 83
676                 DEFAULT => -90
677         },
678         {#State 84
679                 DEFAULT => -13
680         },
681         {#State 85
682                 DEFAULT => -118
683         },
684         {#State 86
685                 ACTIONS => {
686                         ";" => 121
687                 }
688         },
689         {#State 87
690                 ACTIONS => {
691                         ";" => 85
692                 },
693                 DEFAULT => -117,
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 => -85,
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 => -114,
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 => -114,
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 => -114,
780                 GOTOS => {
781                         'optional_identifier' => 128
782                 }
783         },
784         {#State 101
785                 ACTIONS => {
786                         'IDENTIFIER' => 124
787                 },
788                 DEFAULT => -114,
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 => -106
829         },
830         {#State 106
831                 ACTIONS => {
832                         ":" => 67,
833                         "<" => 70,
834                         "~" => 71,
835                         "?" => 69,
836                         "{" => 73,
837                         "=" => 76
838                 },
839                 DEFAULT => -97
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 => -105
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 => -101
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 => -109
900         },
901         {#State 110
902                 ACTIONS => {
903                         ":" => 67,
904                         "<" => 70,
905                         "~" => 71,
906                         "?" => 69,
907                         "{" => 73,
908                         "=" => 76
909                 },
910                 DEFAULT => -108
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 => -103
928         },
929         {#State 113
930                 ACTIONS => {
931                         ":" => 67,
932                         "<" => 70,
933                         "~" => 71,
934                         "?" => 69,
935                         "{" => 73,
936                         "=" => 76
937                 },
938                 DEFAULT => -104
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 => -107
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 => -102
976         },
977         {#State 117
978                 ACTIONS => {
979                         ":" => 67,
980                         "<" => 70,
981                         "~" => 71,
982                         "?" => 69,
983                         "{" => 73,
984                         "=" => 76
985                 },
986                 DEFAULT => -99
987         },
988         {#State 118
989                 ACTIONS => {
990                         ":" => 67,
991                         "<" => 70,
992                         "~" => 71,
993                         "?" => 69,
994                         "{" => 73,
995                         "=" => 76
996                 },
997                 DEFAULT => -98
998         },
999         {#State 119
1000                 ACTIONS => {
1001                         ":" => 67,
1002                         "<" => 70,
1003                         "~" => 71,
1004                         "?" => 69,
1005                         "{" => 73,
1006                         "=" => 76
1007                 },
1008                 DEFAULT => -100
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 => -92
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 => -113
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 => -93,
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 => -93,
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 => -82,
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                         "," => -78,
1202                         "void" => 166,
1203                         ")" => -78
1204                 },
1205                 DEFAULT => -85,
1206                 GOTOS => {
1207                         'base_element' => 163,
1208                         'element_list2' => 165,
1209                         'property_list' => 164
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 => -111
1243         },
1244         {#State 151
1245                 ACTIONS => {
1246                         ":" => 67,
1247                         "<" => 70,
1248                         "~" => 71,
1249                         "?" => 69,
1250                         "{" => 73,
1251                         "=" => 76
1252                 },
1253                 DEFAULT => -110
1254         },
1255         {#State 152
1256                 ACTIONS => {
1257                         'CONSTANT' => 48,
1258                         'TEXT' => 16,
1259                         "]" => 169,
1260                         'IDENTIFIER' => 26
1261                 },
1262                 DEFAULT => -93,
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 => -85,
1280                 GOTOS => {
1281                         'optional_base_element' => 174,
1282                         'property_list' => 173
1283                 }
1284         },
1285         {#State 155
1286                 ACTIONS => {
1287                         "}" => 175
1288                 },
1289                 DEFAULT => -85,
1290                 GOTOS => {
1291                         'base_element' => 176,
1292                         'property_list' => 164
1293                 }
1294         },
1295         {#State 156
1296                 ACTIONS => {
1297                         "=" => 177
1298                 },
1299                 DEFAULT => -48
1300         },
1301         {#State 157
1302                 DEFAULT => -46
1303         },
1304         {#State 158
1305                 ACTIONS => {
1306                         "}" => 178,
1307                         "," => 179
1308                 }
1309         },
1310         {#State 159
1311                 ACTIONS => {
1312                         "," => 180
1313                 },
1314                 DEFAULT => -57
1315         },
1316         {#State 160
1317                 DEFAULT => -54
1318         },
1319         {#State 161
1320                 ACTIONS => {
1321                         "=" => 181
1322                 }
1323         },
1324         {#State 162
1325                 ACTIONS => {
1326                         "}" => 182
1327                 }
1328         },
1329         {#State 163
1330                 DEFAULT => -80
1331         },
1332         {#State 164
1333                 ACTIONS => {
1334                         'IDENTIFIER' => 26,
1335                         "signed" => 98,
1336                         'void' => 92,
1337                         "unsigned" => 102,
1338                         "[" => 20
1339                 },
1340                 DEFAULT => -85,
1341                 GOTOS => {
1342                         'existingtype' => 99,
1343                         'bitmap' => 56,
1344                         'usertype' => 94,
1345                         'property_list' => 93,
1346                         'identifier' => 95,
1347                         'struct' => 61,
1348                         'enum' => 64,
1349                         'type' => 183,
1350                         'union' => 66,
1351                         'sign' => 96
1352                 }
1353         },
1354         {#State 165
1355                 ACTIONS => {
1356                         "," => 184,
1357                         ")" => 185
1358                 }
1359         },
1360         {#State 166
1361                 DEFAULT => -79
1362         },
1363         {#State 167
1364                 ACTIONS => {
1365                         "=" => 186
1366                 }
1367         },
1368         {#State 168
1369                 ACTIONS => {
1370                         'CONSTANT' => 48,
1371                         'TEXT' => 16,
1372                         'IDENTIFIER' => 26
1373                 },
1374                 DEFAULT => -93,
1375                 GOTOS => {
1376                         'identifier' => 50,
1377                         'anytext' => 187,
1378                         'text' => 51,
1379                         'constant' => 47
1380                 }
1381         },
1382         {#State 169
1383                 ACTIONS => {
1384                         "[" => 152
1385                 },
1386                 DEFAULT => -82,
1387                 GOTOS => {
1388                         'array_len' => 188
1389                 }
1390         },
1391         {#State 170
1392                 ACTIONS => {
1393                         "-" => 68,
1394                         ":" => 67,
1395                         "?" => 69,
1396                         "<" => 70,
1397                         "+" => 72,
1398                         "~" => 71,
1399                         "&" => 74,
1400                         "{" => 73,
1401                         "/" => 75,
1402                         "=" => 76,
1403                         "|" => 78,
1404                         "(" => 77,
1405                         "*" => 79,
1406                         "." => 80,
1407                         "]" => 189,
1408                         ">" => 81
1409                 }
1410         },
1411         {#State 171
1412                 DEFAULT => -29
1413         },
1414         {#State 172
1415                 DEFAULT => -69
1416         },
1417         {#State 173
1418                 ACTIONS => {
1419                         "[" => 20
1420                 },
1421                 DEFAULT => -85,
1422                 GOTOS => {
1423                         'base_or_empty' => 190,
1424                         'base_element' => 191,
1425                         'empty_element' => 192,
1426                         'property_list' => 193
1427                 }
1428         },
1429         {#State 174
1430                 DEFAULT => -68
1431         },
1432         {#State 175
1433                 DEFAULT => -59
1434         },
1435         {#State 176
1436                 ACTIONS => {
1437                         ";" => 194
1438                 }
1439         },
1440         {#State 177
1441                 ACTIONS => {
1442                         'CONSTANT' => 48,
1443                         'TEXT' => 16,
1444                         'IDENTIFIER' => 26
1445                 },
1446                 DEFAULT => -93,
1447                 GOTOS => {
1448                         'identifier' => 50,
1449                         'anytext' => 195,
1450                         'text' => 51,
1451                         'constant' => 47
1452                 }
1453         },
1454         {#State 178
1455                 DEFAULT => -42
1456         },
1457         {#State 179
1458                 ACTIONS => {
1459                         'IDENTIFIER' => 26
1460                 },
1461                 GOTOS => {
1462                         'identifier' => 156,
1463                         'enum_element' => 196
1464                 }
1465         },
1466         {#State 180
1467                 ACTIONS => {
1468                         'IDENTIFIER' => 26
1469                 },
1470                 GOTOS => {
1471                         'identifier' => 161,
1472                         'bitmap_element' => 197
1473                 }
1474         },
1475         {#State 181
1476                 ACTIONS => {
1477                         'CONSTANT' => 48,
1478                         'TEXT' => 16,
1479                         'IDENTIFIER' => 26
1480                 },
1481                 DEFAULT => -93,
1482                 GOTOS => {
1483                         'identifier' => 50,
1484                         'anytext' => 198,
1485                         'text' => 51,
1486                         'constant' => 47
1487                 }
1488         },
1489         {#State 182
1490                 DEFAULT => -50
1491         },
1492         {#State 183
1493                 DEFAULT => -74,
1494                 GOTOS => {
1495                         'pointers' => 199
1496                 }
1497         },
1498         {#State 184
1499                 DEFAULT => -85,
1500                 GOTOS => {
1501                         'base_element' => 200,
1502                         'property_list' => 164
1503                 }
1504         },
1505         {#State 185
1506                 ACTIONS => {
1507                         ";" => 201
1508                 }
1509         },
1510         {#State 186
1511                 ACTIONS => {
1512                         'CONSTANT' => 48,
1513                         'TEXT' => 16,
1514                         'IDENTIFIER' => 26
1515                 },
1516                 DEFAULT => -93,
1517                 GOTOS => {
1518                         'identifier' => 50,
1519                         'anytext' => 202,
1520                         'text' => 51,
1521                         'constant' => 47
1522                 }
1523         },
1524         {#State 187
1525                 ACTIONS => {
1526                         "-" => 68,
1527                         ":" => 67,
1528                         "?" => 69,
1529                         "<" => 70,
1530                         ";" => 203,
1531                         "+" => 72,
1532                         "~" => 71,
1533                         "&" => 74,
1534                         "{" => 73,
1535                         "/" => 75,
1536                         "=" => 76,
1537                         "|" => 78,
1538                         "(" => 77,
1539                         "*" => 79,
1540                         "." => 80,
1541                         ">" => 81
1542                 }
1543         },
1544         {#State 188
1545                 DEFAULT => -83
1546         },
1547         {#State 189
1548                 ACTIONS => {
1549                         "[" => 152
1550                 },
1551                 DEFAULT => -82,
1552                 GOTOS => {
1553                         'array_len' => 204
1554                 }
1555         },
1556         {#State 190
1557                 DEFAULT => -66
1558         },
1559         {#State 191
1560                 ACTIONS => {
1561                         ";" => 205
1562                 }
1563         },
1564         {#State 192
1565                 DEFAULT => -65
1566         },
1567         {#State 193
1568                 ACTIONS => {
1569                         'IDENTIFIER' => 26,
1570                         "signed" => 98,
1571                         ";" => 206,
1572                         'void' => 92,
1573                         "unsigned" => 102,
1574                         "[" => 20
1575                 },
1576                 DEFAULT => -85,
1577                 GOTOS => {
1578                         'existingtype' => 99,
1579                         'bitmap' => 56,
1580                         'usertype' => 94,
1581                         'property_list' => 93,
1582                         'identifier' => 95,
1583                         'struct' => 61,
1584                         'enum' => 64,
1585                         'type' => 183,
1586                         'union' => 66,
1587                         'sign' => 96
1588                 }
1589         },
1590         {#State 194
1591                 DEFAULT => -77
1592         },
1593         {#State 195
1594                 ACTIONS => {
1595                         "-" => 68,
1596                         ":" => 67,
1597                         "<" => 70,
1598                         "+" => 72,
1599                         "~" => 71,
1600                         "*" => 79,
1601                         "?" => 69,
1602                         "{" => 73,
1603                         "&" => 74,
1604                         "/" => 75,
1605                         "=" => 76,
1606                         "(" => 77,
1607                         "|" => 78,
1608                         "." => 80,
1609                         ">" => 81
1610                 },
1611                 DEFAULT => -49
1612         },
1613         {#State 196
1614                 DEFAULT => -47
1615         },
1616         {#State 197
1617                 DEFAULT => -55
1618         },
1619         {#State 198
1620                 ACTIONS => {
1621                         "-" => 68,
1622                         ":" => 67,
1623                         "<" => 70,
1624                         "+" => 72,
1625                         "~" => 71,
1626                         "*" => 79,
1627                         "?" => 69,
1628                         "{" => 73,
1629                         "&" => 74,
1630                         "/" => 75,
1631                         "=" => 76,
1632                         "(" => 77,
1633                         "|" => 78,
1634                         "." => 80,
1635                         ">" => 81
1636                 },
1637                 DEFAULT => -58
1638         },
1639         {#State 199
1640                 ACTIONS => {
1641                         'IDENTIFIER' => 26,
1642                         "*" => 149
1643                 },
1644                 GOTOS => {
1645                         'identifier' => 207
1646                 }
1647         },
1648         {#State 200
1649                 DEFAULT => -81
1650         },
1651         {#State 201
1652                 DEFAULT => -28
1653         },
1654         {#State 202
1655                 ACTIONS => {
1656                         "-" => 68,
1657                         ":" => 67,
1658                         "?" => 69,
1659                         "<" => 70,
1660                         ";" => 208,
1661                         "+" => 72,
1662                         "~" => 71,
1663                         "&" => 74,
1664                         "{" => 73,
1665                         "/" => 75,
1666                         "=" => 76,
1667                         "|" => 78,
1668                         "(" => 77,
1669                         "*" => 79,
1670                         "." => 80,
1671                         ">" => 81
1672                 }
1673         },
1674         {#State 203
1675                 DEFAULT => -26
1676         },
1677         {#State 204
1678                 DEFAULT => -84
1679         },
1680         {#State 205
1681                 DEFAULT => -64
1682         },
1683         {#State 206
1684                 DEFAULT => -63
1685         },
1686         {#State 207
1687                 ACTIONS => {
1688                         "[" => 152
1689                 },
1690                 DEFAULT => -82,
1691                 GOTOS => {
1692                         'array_len' => 209
1693                 }
1694         },
1695         {#State 208
1696                 DEFAULT => -27
1697         },
1698         {#State 209
1699                 DEFAULT => -73
1700         }
1701 ],
1702                                   yyrules  =>
1703 [
1704         [#Rule 0
1705                  '$start', 2, undef
1706         ],
1707         [#Rule 1
1708                  'idl', 0, undef
1709         ],
1710         [#Rule 2
1711                  'idl', 2,
1712 sub
1713 #line 19 "pidl/idl.yp"
1714 { push(@{$_[1]}, $_[2]); $_[1] }
1715         ],
1716         [#Rule 3
1717                  'idl', 2,
1718 sub
1719 #line 20 "pidl/idl.yp"
1720 { push(@{$_[1]}, $_[2]); $_[1] }
1721         ],
1722         [#Rule 4
1723                  'idl', 2,
1724 sub
1725 #line 21 "pidl/idl.yp"
1726 { push(@{$_[1]}, $_[2]); $_[1] }
1727         ],
1728         [#Rule 5
1729                  'idl', 2,
1730 sub
1731 #line 22 "pidl/idl.yp"
1732 { push(@{$_[1]}, $_[2]); $_[1] }
1733         ],
1734         [#Rule 6
1735                  'idl', 2,
1736 sub
1737 #line 23 "pidl/idl.yp"
1738 { push(@{$_[1]}, $_[2]); $_[1] }
1739         ],
1740         [#Rule 7
1741                  'idl', 2,
1742 sub
1743 #line 24 "pidl/idl.yp"
1744 { push(@{$_[1]}, $_[2]); $_[1] }
1745         ],
1746         [#Rule 8
1747                  'import', 3,
1748 sub
1749 #line 27 "pidl/idl.yp"
1750 {{
1751                         "TYPE" => "IMPORT", 
1752                         "PATHS" => $_[2],
1753                    "FILE" => $_[0]->YYData->{FILE},
1754                    "LINE" => $_[0]->YYData->{LINE}
1755                 }}
1756         ],
1757         [#Rule 9
1758                  'include', 3,
1759 sub
1760 #line 34 "pidl/idl.yp"
1761 {{ 
1762                         "TYPE" => "INCLUDE", 
1763                         "PATHS" => $_[2],
1764                    "FILE" => $_[0]->YYData->{FILE},
1765                    "LINE" => $_[0]->YYData->{LINE}
1766                 }}
1767         ],
1768         [#Rule 10
1769                  'importlib', 3,
1770 sub
1771 #line 41 "pidl/idl.yp"
1772 {{ 
1773                         "TYPE" => "IMPORTLIB", 
1774                         "PATHS" => $_[2],
1775                    "FILE" => $_[0]->YYData->{FILE},
1776                    "LINE" => $_[0]->YYData->{LINE}
1777                 }}
1778         ],
1779         [#Rule 11
1780                  'commalist', 1,
1781 sub
1782 #line 50 "pidl/idl.yp"
1783 { [ $_[1] ] }
1784         ],
1785         [#Rule 12
1786                  'commalist', 3,
1787 sub
1788 #line 51 "pidl/idl.yp"
1789 { push(@{$_[1]}, $_[3]); $_[1] }
1790         ],
1791         [#Rule 13
1792                  'coclass', 7,
1793 sub
1794 #line 55 "pidl/idl.yp"
1795 {{
1796                "TYPE" => "COCLASS", 
1797                "PROPERTIES" => $_[1],
1798                "NAME" => $_[3],
1799                "DATA" => $_[5],
1800                    "FILE" => $_[0]->YYData->{FILE},
1801                    "LINE" => $_[0]->YYData->{LINE},
1802           }}
1803         ],
1804         [#Rule 14
1805                  'interface_names', 0, undef
1806         ],
1807         [#Rule 15
1808                  'interface_names', 4,
1809 sub
1810 #line 67 "pidl/idl.yp"
1811 { push(@{$_[1]}, $_[2]); $_[1] }
1812         ],
1813         [#Rule 16
1814                  'interface', 8,
1815 sub
1816 #line 71 "pidl/idl.yp"
1817 {{
1818                "TYPE" => "INTERFACE", 
1819                "PROPERTIES" => $_[1],
1820                "NAME" => $_[3],
1821                    "BASE" => $_[4],
1822                "DATA" => $_[6],
1823                    "FILE" => $_[0]->YYData->{FILE},
1824                    "LINE" => $_[0]->YYData->{LINE},
1825           }}
1826         ],
1827         [#Rule 17
1828                  'base_interface', 0, undef
1829         ],
1830         [#Rule 18
1831                  'base_interface', 2,
1832 sub
1833 #line 84 "pidl/idl.yp"
1834 { $_[2] }
1835         ],
1836         [#Rule 19
1837                  'cpp_quote', 4,
1838 sub
1839 #line 89 "pidl/idl.yp"
1840 {{
1841                  "TYPE" => "CPP_QUOTE",
1842                  "FILE" => $_[0]->YYData->{FILE},
1843                  "LINE" => $_[0]->YYData->{LINE},
1844                  "DATA" => $_[3]
1845         }}
1846         ],
1847         [#Rule 20
1848                  'definitions', 1,
1849 sub
1850 #line 98 "pidl/idl.yp"
1851 { [ $_[1] ] }
1852         ],
1853         [#Rule 21
1854                  'definitions', 2,
1855 sub
1856 #line 99 "pidl/idl.yp"
1857 { push(@{$_[1]}, $_[2]); $_[1] }
1858         ],
1859         [#Rule 22
1860                  'definition', 1, undef
1861         ],
1862         [#Rule 23
1863                  'definition', 1, undef
1864         ],
1865         [#Rule 24
1866                  'definition', 1, undef
1867         ],
1868         [#Rule 25
1869                  'definition', 1, undef
1870         ],
1871         [#Rule 26
1872                  'const', 7,
1873 sub
1874 #line 107 "pidl/idl.yp"
1875 {{
1876                      "TYPE"  => "CONST", 
1877                      "DTYPE"  => $_[2],
1878                          "POINTERS" => $_[3],
1879                      "NAME"  => $_[4],
1880                      "VALUE" => $_[6],
1881                      "FILE" => $_[0]->YYData->{FILE},
1882                      "LINE" => $_[0]->YYData->{LINE},
1883         }}
1884         ],
1885         [#Rule 27
1886                  'const', 8,
1887 sub
1888 #line 117 "pidl/idl.yp"
1889 {{
1890                      "TYPE"  => "CONST", 
1891                      "DTYPE"  => $_[2],
1892                          "POINTERS" => $_[3],
1893                      "NAME"  => $_[4],
1894                      "ARRAY_LEN" => $_[5],
1895                      "VALUE" => $_[7],
1896                      "FILE" => $_[0]->YYData->{FILE},
1897                      "LINE" => $_[0]->YYData->{LINE},
1898         }}
1899         ],
1900         [#Rule 28
1901                  'function', 7,
1902 sub
1903 #line 131 "pidl/idl.yp"
1904 {{
1905                 "TYPE" => "FUNCTION",
1906                 "NAME" => $_[3],
1907                 "RETURN_TYPE" => $_[2],
1908                 "PROPERTIES" => $_[1],
1909                 "ELEMENTS" => $_[5],
1910                 "FILE" => $_[0]->YYData->{FILE},
1911                 "LINE" => $_[0]->YYData->{LINE},
1912           }}
1913         ],
1914         [#Rule 29
1915                  'typedef', 6,
1916 sub
1917 #line 143 "pidl/idl.yp"
1918 {{
1919                      "TYPE" => "TYPEDEF", 
1920                      "PROPERTIES" => $_[1],
1921                      "NAME" => $_[4],
1922                      "DATA" => $_[3],
1923                      "ARRAY_LEN" => $_[5],
1924                      "FILE" => $_[0]->YYData->{FILE},
1925                      "LINE" => $_[0]->YYData->{LINE},
1926         }}
1927         ],
1928         [#Rule 30
1929                  'usertype', 1, undef
1930         ],
1931         [#Rule 31
1932                  'usertype', 1, undef
1933         ],
1934         [#Rule 32
1935                  'usertype', 1, undef
1936         ],
1937         [#Rule 33
1938                  'usertype', 1, undef
1939         ],
1940         [#Rule 34
1941                  'typedecl', 2,
1942 sub
1943 #line 156 "pidl/idl.yp"
1944 { $_[1] }
1945         ],
1946         [#Rule 35
1947                  'sign', 1, undef
1948         ],
1949         [#Rule 36
1950                  'sign', 1, undef
1951         ],
1952         [#Rule 37
1953                  'existingtype', 2,
1954 sub
1955 #line 161 "pidl/idl.yp"
1956 { ($_[1]?$_[1]:"signed") ." $_[2]" }
1957         ],
1958         [#Rule 38
1959                  'existingtype', 1, undef
1960         ],
1961         [#Rule 39
1962                  'type', 1, undef
1963         ],
1964         [#Rule 40
1965                  'type', 1, undef
1966         ],
1967         [#Rule 41
1968                  'type', 1,
1969 sub
1970 #line 165 "pidl/idl.yp"
1971 { "void" }
1972         ],
1973         [#Rule 42
1974                  'enum_body', 3,
1975 sub
1976 #line 167 "pidl/idl.yp"
1977 { $_[2] }
1978         ],
1979         [#Rule 43
1980                  'opt_enum_body', 0, undef
1981         ],
1982         [#Rule 44
1983                  'opt_enum_body', 1, undef
1984         ],
1985         [#Rule 45
1986                  'enum', 4,
1987 sub
1988 #line 170 "pidl/idl.yp"
1989 {{
1990              "TYPE" => "ENUM", 
1991                          "PROPERTIES" => $_[1],
1992                          "NAME" => $_[3],
1993                      "ELEMENTS" => $_[4]
1994         }}
1995         ],
1996         [#Rule 46
1997                  'enum_elements', 1,
1998 sub
1999 #line 179 "pidl/idl.yp"
2000 { [ $_[1] ] }
2001         ],
2002         [#Rule 47
2003                  'enum_elements', 3,
2004 sub
2005 #line 180 "pidl/idl.yp"
2006 { push(@{$_[1]}, $_[3]); $_[1] }
2007         ],
2008         [#Rule 48
2009                  'enum_element', 1, undef
2010         ],
2011         [#Rule 49
2012                  'enum_element', 3,
2013 sub
2014 #line 184 "pidl/idl.yp"
2015 { "$_[1]$_[2]$_[3]" }
2016         ],
2017         [#Rule 50
2018                  'bitmap_body', 3,
2019 sub
2020 #line 187 "pidl/idl.yp"
2021 { $_[2] }
2022         ],
2023         [#Rule 51
2024                  'opt_bitmap_body', 0, undef
2025         ],
2026         [#Rule 52
2027                  'opt_bitmap_body', 1, undef
2028         ],
2029         [#Rule 53
2030                  'bitmap', 4,
2031 sub
2032 #line 190 "pidl/idl.yp"
2033 {{
2034              "TYPE" => "BITMAP", 
2035                      "PROPERTIES" => $_[1],
2036                          "NAME" => $_[3],
2037                      "ELEMENTS" => $_[4]
2038         }}
2039         ],
2040         [#Rule 54
2041                  'bitmap_elements', 1,
2042 sub
2043 #line 199 "pidl/idl.yp"
2044 { [ $_[1] ] }
2045         ],
2046         [#Rule 55
2047                  'bitmap_elements', 3,
2048 sub
2049 #line 200 "pidl/idl.yp"
2050 { push(@{$_[1]}, $_[3]); $_[1] }
2051         ],
2052         [#Rule 56
2053                  'opt_bitmap_elements', 0, undef
2054         ],
2055         [#Rule 57
2056                  'opt_bitmap_elements', 1, undef
2057         ],
2058         [#Rule 58
2059                  'bitmap_element', 3,
2060 sub
2061 #line 205 "pidl/idl.yp"
2062 { "$_[1] ( $_[3] )" }
2063         ],
2064         [#Rule 59
2065                  'struct_body', 3,
2066 sub
2067 #line 208 "pidl/idl.yp"
2068 { $_[2] }
2069         ],
2070         [#Rule 60
2071                  'opt_struct_body', 0, undef
2072         ],
2073         [#Rule 61
2074                  'opt_struct_body', 1, undef
2075         ],
2076         [#Rule 62
2077                  'struct', 4,
2078 sub
2079 #line 212 "pidl/idl.yp"
2080 {{
2081              "TYPE" => "STRUCT", 
2082                          "PROPERTIES" => $_[1],
2083                          "NAME" => $_[3],
2084                      "ELEMENTS" => $_[4]
2085         }}
2086         ],
2087         [#Rule 63
2088                  'empty_element', 2,
2089 sub
2090 #line 221 "pidl/idl.yp"
2091 {{
2092                  "NAME" => "",
2093                  "TYPE" => "EMPTY",
2094                  "PROPERTIES" => $_[1],
2095                  "POINTERS" => 0,
2096                  "ARRAY_LEN" => [],
2097                  "FILE" => $_[0]->YYData->{FILE},
2098                  "LINE" => $_[0]->YYData->{LINE},
2099          }}
2100         ],
2101         [#Rule 64
2102                  'base_or_empty', 2, undef
2103         ],
2104         [#Rule 65
2105                  'base_or_empty', 1, undef
2106         ],
2107         [#Rule 66
2108                  'optional_base_element', 2,
2109 sub
2110 #line 235 "pidl/idl.yp"
2111 { $_[2]->{PROPERTIES} = FlattenHash([$_[1],$_[2]->{PROPERTIES}]); $_[2] }
2112         ],
2113         [#Rule 67
2114                  'union_elements', 0, undef
2115         ],
2116         [#Rule 68
2117                  'union_elements', 2,
2118 sub
2119 #line 240 "pidl/idl.yp"
2120 { push(@{$_[1]}, $_[2]); $_[1] }
2121         ],
2122         [#Rule 69
2123                  'union_body', 3,
2124 sub
2125 #line 243 "pidl/idl.yp"
2126 { $_[2] }
2127         ],
2128         [#Rule 70
2129                  'opt_union_body', 0, undef
2130         ],
2131         [#Rule 71
2132                  'opt_union_body', 1, undef
2133         ],
2134         [#Rule 72
2135                  'union', 4,
2136 sub
2137 #line 247 "pidl/idl.yp"
2138 {{
2139              "TYPE" => "UNION", 
2140                          "PROPERTIES" => $_[1],
2141                      "NAME" => $_[3],
2142                      "ELEMENTS" => $_[4]
2143         }}
2144         ],
2145         [#Rule 73
2146                  'base_element', 5,
2147 sub
2148 #line 256 "pidl/idl.yp"
2149 {{
2150                            "NAME" => $_[4],
2151                            "TYPE" => $_[2],
2152                            "PROPERTIES" => $_[1],
2153                            "POINTERS" => $_[3],
2154                            "ARRAY_LEN" => $_[5],
2155                        "FILE" => $_[0]->YYData->{FILE},
2156                        "LINE" => $_[0]->YYData->{LINE},
2157               }}
2158         ],
2159         [#Rule 74
2160                  'pointers', 0,
2161 sub
2162 #line 270 "pidl/idl.yp"
2163 { 0 }
2164         ],
2165         [#Rule 75
2166                  'pointers', 2,
2167 sub
2168 #line 271 "pidl/idl.yp"
2169 { $_[1]+1 }
2170         ],
2171         [#Rule 76
2172                  'element_list1', 0,
2173 sub
2174 #line 275 "pidl/idl.yp"
2175 { [] }
2176         ],
2177         [#Rule 77
2178                  'element_list1', 3,
2179 sub
2180 #line 276 "pidl/idl.yp"
2181 { push(@{$_[1]}, $_[2]); $_[1] }
2182         ],
2183         [#Rule 78
2184                  'element_list2', 0, undef
2185         ],
2186         [#Rule 79
2187                  'element_list2', 1, undef
2188         ],
2189         [#Rule 80
2190                  'element_list2', 1,
2191 sub
2192 #line 282 "pidl/idl.yp"
2193 { [ $_[1] ] }
2194         ],
2195         [#Rule 81
2196                  'element_list2', 3,
2197 sub
2198 #line 283 "pidl/idl.yp"
2199 { push(@{$_[1]}, $_[3]); $_[1] }
2200         ],
2201         [#Rule 82
2202                  'array_len', 0, undef
2203         ],
2204         [#Rule 83
2205                  'array_len', 3,
2206 sub
2207 #line 288 "pidl/idl.yp"
2208 { push(@{$_[3]}, "*"); $_[3] }
2209         ],
2210         [#Rule 84
2211                  'array_len', 4,
2212 sub
2213 #line 289 "pidl/idl.yp"
2214 { push(@{$_[4]}, "$_[2]"); $_[4] }
2215         ],
2216         [#Rule 85
2217                  'property_list', 0, undef
2218         ],
2219         [#Rule 86
2220                  'property_list', 4,
2221 sub
2222 #line 295 "pidl/idl.yp"
2223 { FlattenHash([$_[1],$_[3]]); }
2224         ],
2225         [#Rule 87
2226                  'properties', 1,
2227 sub
2228 #line 298 "pidl/idl.yp"
2229 { $_[1] }
2230         ],
2231         [#Rule 88
2232                  'properties', 3,
2233 sub
2234 #line 299 "pidl/idl.yp"
2235 { FlattenHash([$_[1], $_[3]]); }
2236         ],
2237         [#Rule 89
2238                  'property', 1,
2239 sub
2240 #line 302 "pidl/idl.yp"
2241 {{ "$_[1]" => "1"     }}
2242         ],
2243         [#Rule 90
2244                  'property', 4,
2245 sub
2246 #line 303 "pidl/idl.yp"
2247 {{ "$_[1]" => "$_[3]" }}
2248         ],
2249         [#Rule 91
2250                  'commalisttext', 1, undef
2251         ],
2252         [#Rule 92
2253                  'commalisttext', 3,
2254 sub
2255 #line 308 "pidl/idl.yp"
2256 { "$_[1],$_[3]" }
2257         ],
2258         [#Rule 93
2259                  'anytext', 0,
2260 sub
2261 #line 312 "pidl/idl.yp"
2262 { "" }
2263         ],
2264         [#Rule 94
2265                  'anytext', 1, undef
2266         ],
2267         [#Rule 95
2268                  'anytext', 1, undef
2269         ],
2270         [#Rule 96
2271                  'anytext', 1, undef
2272         ],
2273         [#Rule 97
2274                  'anytext', 3,
2275 sub
2276 #line 314 "pidl/idl.yp"
2277 { "$_[1]$_[2]$_[3]" }
2278         ],
2279         [#Rule 98
2280                  'anytext', 3,
2281 sub
2282 #line 315 "pidl/idl.yp"
2283 { "$_[1]$_[2]$_[3]" }
2284         ],
2285         [#Rule 99
2286                  'anytext', 3,
2287 sub
2288 #line 316 "pidl/idl.yp"
2289 { "$_[1]$_[2]$_[3]" }
2290         ],
2291         [#Rule 100
2292                  'anytext', 3,
2293 sub
2294 #line 317 "pidl/idl.yp"
2295 { "$_[1]$_[2]$_[3]" }
2296         ],
2297         [#Rule 101
2298                  'anytext', 3,
2299 sub
2300 #line 318 "pidl/idl.yp"
2301 { "$_[1]$_[2]$_[3]" }
2302         ],
2303         [#Rule 102
2304                  'anytext', 3,
2305 sub
2306 #line 319 "pidl/idl.yp"
2307 { "$_[1]$_[2]$_[3]" }
2308         ],
2309         [#Rule 103
2310                  'anytext', 3,
2311 sub
2312 #line 320 "pidl/idl.yp"
2313 { "$_[1]$_[2]$_[3]" }
2314         ],
2315         [#Rule 104
2316                  'anytext', 3,
2317 sub
2318 #line 321 "pidl/idl.yp"
2319 { "$_[1]$_[2]$_[3]" }
2320         ],
2321         [#Rule 105
2322                  'anytext', 3,
2323 sub
2324 #line 322 "pidl/idl.yp"
2325 { "$_[1]$_[2]$_[3]" }
2326         ],
2327         [#Rule 106
2328                  'anytext', 3,
2329 sub
2330 #line 323 "pidl/idl.yp"
2331 { "$_[1]$_[2]$_[3]" }
2332         ],
2333         [#Rule 107
2334                  'anytext', 3,
2335 sub
2336 #line 324 "pidl/idl.yp"
2337 { "$_[1]$_[2]$_[3]" }
2338         ],
2339         [#Rule 108
2340                  'anytext', 3,
2341 sub
2342 #line 325 "pidl/idl.yp"
2343 { "$_[1]$_[2]$_[3]" }
2344         ],
2345         [#Rule 109
2346                  'anytext', 3,
2347 sub
2348 #line 326 "pidl/idl.yp"
2349 { "$_[1]$_[2]$_[3]" }
2350         ],
2351         [#Rule 110
2352                  'anytext', 5,
2353 sub
2354 #line 327 "pidl/idl.yp"
2355 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2356         ],
2357         [#Rule 111
2358                  'anytext', 5,
2359 sub
2360 #line 328 "pidl/idl.yp"
2361 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2362         ],
2363         [#Rule 112
2364                  'identifier', 1, undef
2365         ],
2366         [#Rule 113
2367                  'optional_identifier', 1, undef
2368         ],
2369         [#Rule 114
2370                  'optional_identifier', 0, undef
2371         ],
2372         [#Rule 115
2373                  'constant', 1, undef
2374         ],
2375         [#Rule 116
2376                  'text', 1,
2377 sub
2378 #line 342 "pidl/idl.yp"
2379 { "\"$_[1]\"" }
2380         ],
2381         [#Rule 117
2382                  'optional_semicolon', 0, undef
2383         ],
2384         [#Rule 118
2385                  'optional_semicolon', 1, undef
2386         ]
2387 ],
2388                                   @_);
2389     bless($self,$class);
2390 }
2391
2392 #line 353 "pidl/idl.yp"
2393
2394
2395 use Parse::Pidl qw(error);
2396
2397 #####################################################################
2398 # flatten an array of hashes into a single hash
2399 sub FlattenHash($) 
2400
2401     my $a = shift;
2402     my %b;
2403     for my $d (@{$a}) {
2404         for my $k (keys %{$d}) {
2405             $b{$k} = $d->{$k};
2406         }
2407     }
2408     return \%b;
2409 }
2410
2411
2412
2413 #####################################################################
2414 # traverse a perl data structure removing any empty arrays or
2415 # hashes and any hash elements that map to undef
2416 sub CleanData($)
2417 {
2418     sub CleanData($);
2419     my($v) = shift;
2420         return undef if (not defined($v));
2421     if (ref($v) eq "ARRAY") {
2422         foreach my $i (0 .. $#{$v}) {
2423             CleanData($v->[$i]);
2424         }
2425         # this removes any undefined elements from the array
2426         @{$v} = grep { defined $_ } @{$v};
2427     } elsif (ref($v) eq "HASH") {
2428         foreach my $x (keys %{$v}) {
2429             CleanData($v->{$x});
2430             if (!defined $v->{$x}) { delete($v->{$x}); next; }
2431         }
2432     }
2433         return $v;
2434 }
2435
2436 sub _Error {
2437     if (exists $_[0]->YYData->{ERRMSG}) {
2438                 error($_[0]->YYData, $_[0]->YYData->{ERRMSG});
2439                 delete $_[0]->YYData->{ERRMSG};
2440                 return;
2441         }
2442         my $last_token = $_[0]->YYData->{LAST_TOKEN};
2443         
2444         error($_[0]->YYData, "Syntax error near '$last_token'");
2445 }
2446
2447 sub _Lexer($)
2448 {
2449         my($parser)=shift;
2450
2451     $parser->YYData->{INPUT} or return('',undef);
2452
2453 again:
2454         $parser->YYData->{INPUT} =~ s/^[ \t]*//;
2455
2456         for ($parser->YYData->{INPUT}) {
2457                 if (/^\#/) {
2458                         if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
2459                                 $parser->YYData->{LINE} = $1-1;
2460                                 $parser->YYData->{FILE} = $2;
2461                                 goto again;
2462                         }
2463                         if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
2464                                 $parser->YYData->{LINE} = $1-1;
2465                                 $parser->YYData->{FILE} = $2;
2466                                 goto again;
2467                         }
2468                         if (s/^(\#.*)$//m) {
2469                                 goto again;
2470                         }
2471                 }
2472                 if (s/^(\n)//) {
2473                         $parser->YYData->{LINE}++;
2474                         goto again;
2475                 }
2476                 if (s/^\"(.*?)\"//) {
2477                         $parser->YYData->{LAST_TOKEN} = $1;
2478                         return('TEXT',$1); 
2479                 }
2480                 if (s/^(\d+)(\W|$)/$2/) {
2481                         $parser->YYData->{LAST_TOKEN} = $1;
2482                         return('CONSTANT',$1); 
2483                 }
2484                 if (s/^([\w_]+)//) {
2485                         $parser->YYData->{LAST_TOKEN} = $1;
2486                         if ($1 =~ 
2487                             /^(coclass|interface|const|typedef|union|cpp_quote
2488                               |struct|enum|bitmap|void|unsigned|signed|import|include
2489                                   |importlib)$/x) {
2490                                 return $1;
2491                         }
2492                         return('IDENTIFIER',$1);
2493                 }
2494                 if (s/^(.)//s) {
2495                         $parser->YYData->{LAST_TOKEN} = $1;
2496                         return($1,$1);
2497                 }
2498         }
2499 }
2500
2501 sub parse_string
2502 {
2503         my ($data,$filename) = @_;
2504
2505         my $self = new Parse::Pidl::IDL;
2506
2507     $self->YYData->{FILE} = $filename;
2508     $self->YYData->{INPUT} = $data;
2509     $self->YYData->{LINE} = 0;
2510     $self->YYData->{LAST_TOKEN} = "NONE";
2511
2512         my $idl = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error );
2513
2514         return CleanData($idl);
2515 }
2516
2517 sub parse_file($$)
2518 {
2519         my ($filename,$incdirs) = @_;
2520
2521         my $saved_delim = $/;
2522         undef $/;
2523         my $cpp = $ENV{CPP};
2524         if (! defined $cpp) {
2525                 $cpp = "cpp";
2526         }
2527         my $includes = join('',map { " -I$_" } @$incdirs);
2528         my $data = `$cpp -D__PIDL__$includes $filename`;
2529         $/ = $saved_delim;
2530
2531         return parse_string($data, $filename);
2532 }
2533
2534 1;