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