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