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