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