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