r10093: Fix the HF_FIELD conformance file command
[Samba/aatanasov.git] / source4 / pidl / lib / Parse / Pidl / IDL.pm
blob1aa4426cd6a36c9ef482cbfc2387d80a3e183d7c
1 ####################################################################
3 # This file was generated using Parse::Yapp version 1.05.
5 # Don't edit this file, use source file instead.
7 # ANY CHANGE MADE HERE WILL BE LOST !
9 ####################################################################
10 package Parse::Pidl::IDL;
11 use vars qw ( @ISA );
12 use strict;
14 @ISA= qw ( Parse::Yapp::Driver );
15 #Included Parse/Yapp/Driver.pm file----------------------------------------
18 # Module Parse::Yapp::Driver
20 # This module is part of the Parse::Yapp package available on your
21 # nearest CPAN
23 # Any use of this module in a standalone parser make the included
24 # text under the same copyright as the Parse::Yapp module itself.
26 # This notice should remain unchanged.
28 # (c) Copyright 1998-2001 Francois Desarmenien, all rights reserved.
29 # (see the pod text in Parse::Yapp module for use and distribution rights)
32 package Parse::Yapp::Driver;
34 require 5.004;
36 use strict;
38 use vars qw ( $VERSION $COMPATIBLE $FILENAME );
40 $VERSION = '1.05';
41 $COMPATIBLE = '0.07';
42 $FILENAME=__FILE__;
44 use Carp;
46 #Known parameters, all starting with YY (leading YY will be discarded)
47 my(%params)=(YYLEX => 'CODE', 'YYERROR' => 'CODE', YYVERSION => '',
48 YYRULES => 'ARRAY', YYSTATES => 'ARRAY', YYDEBUG => '');
49 #Mandatory parameters
50 my(@params)=('LEX','RULES','STATES');
52 sub new {
53 my($class)=shift;
54 my($errst,$nberr,$token,$value,$check,$dotpos);
55 my($self)={ ERROR => \&_Error,
56 ERRST => \$errst,
57 NBERR => \$nberr,
58 TOKEN => \$token,
59 VALUE => \$value,
60 DOTPOS => \$dotpos,
61 STACK => [],
62 DEBUG => 0,
63 CHECK => \$check };
65 _CheckParams( [], \%params, \@_, $self );
67 exists($$self{VERSION})
68 and $$self{VERSION} < $COMPATIBLE
69 and croak "Yapp driver version $VERSION ".
70 "incompatible with version $$self{VERSION}:\n".
71 "Please recompile parser module.";
73 ref($class)
74 and $class=ref($class);
76 bless($self,$class);
79 sub YYParse {
80 my($self)=shift;
81 my($retval);
83 _CheckParams( \@params, \%params, \@_, $self );
85 if($$self{DEBUG}) {
86 _DBLoad();
87 $retval = eval '$self->_DBParse()';#Do not create stab entry on compile
88 $@ and die $@;
90 else {
91 $retval = $self->_Parse();
93 $retval
96 sub YYData {
97 my($self)=shift;
99 exists($$self{USER})
100 or $$self{USER}={};
102 $$self{USER};
106 sub YYErrok {
107 my($self)=shift;
109 ${$$self{ERRST}}=0;
110 undef;
113 sub YYNberr {
114 my($self)=shift;
116 ${$$self{NBERR}};
119 sub YYRecovering {
120 my($self)=shift;
122 ${$$self{ERRST}} != 0;
125 sub YYAbort {
126 my($self)=shift;
128 ${$$self{CHECK}}='ABORT';
129 undef;
132 sub YYAccept {
133 my($self)=shift;
135 ${$$self{CHECK}}='ACCEPT';
136 undef;
139 sub YYError {
140 my($self)=shift;
142 ${$$self{CHECK}}='ERROR';
143 undef;
146 sub YYSemval {
147 my($self)=shift;
148 my($index)= $_[0] - ${$$self{DOTPOS}} - 1;
150 $index < 0
151 and -$index <= @{$$self{STACK}}
152 and return $$self{STACK}[$index][1];
154 undef; #Invalid index
157 sub YYCurtok {
158 my($self)=shift;
161 and ${$$self{TOKEN}}=$_[0];
162 ${$$self{TOKEN}};
165 sub YYCurval {
166 my($self)=shift;
169 and ${$$self{VALUE}}=$_[0];
170 ${$$self{VALUE}};
173 sub YYExpect {
174 my($self)=shift;
176 keys %{$self->{STATES}[$self->{STACK}[-1][0]]{ACTIONS}}
179 sub YYLexer {
180 my($self)=shift;
182 $$self{LEX};
186 #################
187 # Private stuff #
188 #################
191 sub _CheckParams {
192 my($mandatory,$checklist,$inarray,$outhash)=@_;
193 my($prm,$value);
194 my($prmlst)={};
196 while(($prm,$value)=splice(@$inarray,0,2)) {
197 $prm=uc($prm);
198 exists($$checklist{$prm})
199 or croak("Unknow parameter '$prm'");
200 ref($value) eq $$checklist{$prm}
201 or croak("Invalid value for parameter '$prm'");
202 $prm=unpack('@2A*',$prm);
203 $$outhash{$prm}=$value;
205 for (@$mandatory) {
206 exists($$outhash{$_})
207 or croak("Missing mandatory parameter '".lc($_)."'");
211 sub _Error {
212 print "Parse error.\n";
215 sub _DBLoad {
217 no strict 'refs';
219 exists(${__PACKAGE__.'::'}{_DBParse})#Already loaded ?
220 and return;
222 my($fname)=__FILE__;
223 my(@drv);
224 open(DRV,"<$fname") or die "Report this as a BUG: Cannot open $fname";
225 while(<DRV>) {
226 /^\s*sub\s+_Parse\s*{\s*$/ .. /^\s*}\s*#\s*_Parse\s*$/
227 and do {
228 s/^#DBG>//;
229 push(@drv,$_);
232 close(DRV);
234 $drv[0]=~s/_P/_DBP/;
235 eval join('',@drv);
238 #Note that for loading debugging version of the driver,
239 #this file will be parsed from 'sub _Parse' up to '}#_Parse' inclusive.
240 #So, DO NOT remove comment at end of sub !!!
241 sub _Parse {
242 my($self)=shift;
244 my($rules,$states,$lex,$error)
245 = @$self{ 'RULES', 'STATES', 'LEX', 'ERROR' };
246 my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos)
247 = @$self{ 'ERRST', 'NBERR', 'TOKEN', 'VALUE', 'STACK', 'CHECK', 'DOTPOS' };
249 #DBG> my($debug)=$$self{DEBUG};
250 #DBG> my($dbgerror)=0;
252 #DBG> my($ShowCurToken) = sub {
253 #DBG> my($tok)='>';
254 #DBG> for (split('',$$token)) {
255 #DBG> $tok.= (ord($_) < 32 or ord($_) > 126)
256 #DBG> ? sprintf('<%02X>',ord($_))
257 #DBG> : $_;
258 #DBG> }
259 #DBG> $tok.='<';
260 #DBG> };
262 $$errstatus=0;
263 $$nberror=0;
264 ($$token,$$value)=(undef,undef);
265 @$stack=( [ 0, undef ] );
266 $$check='';
268 while(1) {
269 my($actions,$act,$stateno);
271 $stateno=$$stack[-1][0];
272 $actions=$$states[$stateno];
274 #DBG> print STDERR ('-' x 40),"\n";
275 #DBG> $debug & 0x2
276 #DBG> and print STDERR "In state $stateno:\n";
277 #DBG> $debug & 0x08
278 #DBG> and print STDERR "Stack:[".
279 #DBG> join(',',map { $$_[0] } @$stack).
280 #DBG> "]\n";
283 if (exists($$actions{ACTIONS})) {
285 defined($$token)
286 or do {
287 ($$token,$$value)=&$lex($self);
288 #DBG> $debug & 0x01
289 #DBG> and print STDERR "Need token. Got ".&$ShowCurToken."\n";
292 $act= exists($$actions{ACTIONS}{$$token})
293 ? $$actions{ACTIONS}{$$token}
294 : exists($$actions{DEFAULT})
295 ? $$actions{DEFAULT}
296 : undef;
298 else {
299 $act=$$actions{DEFAULT};
300 #DBG> $debug & 0x01
301 #DBG> and print STDERR "Don't need token.\n";
304 defined($act)
305 and do {
307 $act > 0
308 and do { #shift
310 #DBG> $debug & 0x04
311 #DBG> and print STDERR "Shift and go to state $act.\n";
313 $$errstatus
314 and do {
315 --$$errstatus;
317 #DBG> $debug & 0x10
318 #DBG> and $dbgerror
319 #DBG> and $$errstatus == 0
320 #DBG> and do {
321 #DBG> print STDERR "**End of Error recovery.\n";
322 #DBG> $dbgerror=0;
323 #DBG> };
327 push(@$stack,[ $act, $$value ]);
329 $$token ne '' #Don't eat the eof
330 and $$token=$$value=undef;
331 next;
334 #reduce
335 my($lhs,$len,$code,@sempar,$semval);
336 ($lhs,$len,$code)=@{$$rules[-$act]};
338 #DBG> $debug & 0x04
339 #DBG> and $act
340 #DBG> and print STDERR "Reduce using rule ".-$act." ($lhs,$len): ";
342 $act
343 or $self->YYAccept();
345 $$dotpos=$len;
347 unpack('A1',$lhs) eq '@' #In line rule
348 and do {
349 $lhs =~ /^\@[0-9]+\-([0-9]+)$/
350 or die "In line rule name '$lhs' ill formed: ".
351 "report it as a BUG.\n";
352 $$dotpos = $1;
355 @sempar = $$dotpos
356 ? map { $$_[1] } @$stack[ -$$dotpos .. -1 ]
357 : ();
359 $semval = $code ? &$code( $self, @sempar )
360 : @sempar ? $sempar[0] : undef;
362 splice(@$stack,-$len,$len);
364 $$check eq 'ACCEPT'
365 and do {
367 #DBG> $debug & 0x04
368 #DBG> and print STDERR "Accept.\n";
370 return($semval);
373 $$check eq 'ABORT'
374 and do {
376 #DBG> $debug & 0x04
377 #DBG> and print STDERR "Abort.\n";
379 return(undef);
383 #DBG> $debug & 0x04
384 #DBG> and print STDERR "Back to state $$stack[-1][0], then ";
386 $$check eq 'ERROR'
387 or do {
388 #DBG> $debug & 0x04
389 #DBG> and print STDERR
390 #DBG> "go to state $$states[$$stack[-1][0]]{GOTOS}{$lhs}.\n";
392 #DBG> $debug & 0x10
393 #DBG> and $dbgerror
394 #DBG> and $$errstatus == 0
395 #DBG> and do {
396 #DBG> print STDERR "**End of Error recovery.\n";
397 #DBG> $dbgerror=0;
398 #DBG> };
400 push(@$stack,
401 [ $$states[$$stack[-1][0]]{GOTOS}{$lhs}, $semval ]);
402 $$check='';
403 next;
406 #DBG> $debug & 0x04
407 #DBG> and print STDERR "Forced Error recovery.\n";
409 $$check='';
413 #Error
414 $$errstatus
415 or do {
417 $$errstatus = 1;
418 &$error($self);
419 $$errstatus # if 0, then YYErrok has been called
420 or next; # so continue parsing
422 #DBG> $debug & 0x10
423 #DBG> and do {
424 #DBG> print STDERR "**Entering Error recovery.\n";
425 #DBG> ++$dbgerror;
426 #DBG> };
428 ++$$nberror;
432 $$errstatus == 3 #The next token is not valid: discard it
433 and do {
434 $$token eq '' # End of input: no hope
435 and do {
436 #DBG> $debug & 0x10
437 #DBG> and print STDERR "**At eof: aborting.\n";
438 return(undef);
441 #DBG> $debug & 0x10
442 #DBG> and print STDERR "**Dicard invalid token ".&$ShowCurToken.".\n";
444 $$token=$$value=undef;
447 $$errstatus=3;
449 while( @$stack
450 and ( not exists($$states[$$stack[-1][0]]{ACTIONS})
451 or not exists($$states[$$stack[-1][0]]{ACTIONS}{error})
452 or $$states[$$stack[-1][0]]{ACTIONS}{error} <= 0)) {
454 #DBG> $debug & 0x10
455 #DBG> and print STDERR "**Pop state $$stack[-1][0].\n";
457 pop(@$stack);
460 @$stack
461 or do {
463 #DBG> $debug & 0x10
464 #DBG> and print STDERR "**No state left on stack: aborting.\n";
466 return(undef);
469 #shift the error token
471 #DBG> $debug & 0x10
472 #DBG> and print STDERR "**Shift \$error token and go to state ".
473 #DBG> $$states[$$stack[-1][0]]{ACTIONS}{error}.
474 #DBG> ".\n";
476 push(@$stack, [ $$states[$$stack[-1][0]]{ACTIONS}{error}, undef ]);
480 #never reached
481 croak("Error in driver logic. Please, report it as a BUG");
483 }#_Parse
484 #DO NOT remove comment
489 #End of include--------------------------------------------------
494 sub new {
495 my($class)=shift;
496 ref($class)
497 and $class=ref($class);
499 my($self)=$class->SUPER::new( yyversion => '1.05',
500 yystates =>
502 {#State 0
503 DEFAULT => -1,
504 GOTOS => {
505 'idl' => 1
508 {#State 1
509 ACTIONS => {
510 '' => 2
512 DEFAULT => -63,
513 GOTOS => {
514 'interface' => 3,
515 'coclass' => 4,
516 'property_list' => 5
519 {#State 2
520 DEFAULT => 0
522 {#State 3
523 DEFAULT => -2
525 {#State 4
526 DEFAULT => -3
528 {#State 5
529 ACTIONS => {
530 "coclass" => 6,
531 "interface" => 8,
532 "[" => 7
535 {#State 6
536 ACTIONS => {
537 'IDENTIFIER' => 9
539 GOTOS => {
540 'identifier' => 10
543 {#State 7
544 ACTIONS => {
545 'IDENTIFIER' => 9
547 GOTOS => {
548 'identifier' => 11,
549 'properties' => 13,
550 'property' => 12
553 {#State 8
554 ACTIONS => {
555 'IDENTIFIER' => 9
557 GOTOS => {
558 'identifier' => 14
561 {#State 9
562 DEFAULT => -92
564 {#State 10
565 ACTIONS => {
566 "{" => 15
569 {#State 11
570 ACTIONS => {
571 "(" => 16
573 DEFAULT => -67
575 {#State 12
576 DEFAULT => -65
578 {#State 13
579 ACTIONS => {
580 "," => 17,
581 "]" => 18
584 {#State 14
585 ACTIONS => {
586 ":" => 19
588 DEFAULT => -8,
589 GOTOS => {
590 'base_interface' => 20
593 {#State 15
594 DEFAULT => -5,
595 GOTOS => {
596 'interface_names' => 21
599 {#State 16
600 ACTIONS => {
601 'CONSTANT' => 28,
602 'TEXT' => 22,
603 'IDENTIFIER' => 9
605 DEFAULT => -73,
606 GOTOS => {
607 'identifier' => 23,
608 'listtext' => 26,
609 'anytext' => 25,
610 'text' => 24,
611 'constant' => 27
614 {#State 17
615 ACTIONS => {
616 'IDENTIFIER' => 9
618 GOTOS => {
619 'identifier' => 11,
620 'property' => 29
623 {#State 18
624 DEFAULT => -64
626 {#State 19
627 ACTIONS => {
628 'IDENTIFIER' => 9
630 GOTOS => {
631 'identifier' => 30
634 {#State 20
635 ACTIONS => {
636 "{" => 31
639 {#State 21
640 ACTIONS => {
641 "}" => 32,
642 "interface" => 33
645 {#State 22
646 DEFAULT => -96
648 {#State 23
649 DEFAULT => -74
651 {#State 24
652 DEFAULT => -76
654 {#State 25
655 ACTIONS => {
656 "-" => 35,
657 ":" => 34,
658 "<" => 37,
659 "+" => 39,
660 "~" => 38,
661 "*" => 46,
662 "?" => 36,
663 "{" => 40,
664 "&" => 41,
665 "/" => 42,
666 "=" => 43,
667 "(" => 44,
668 "|" => 45,
669 "." => 47,
670 ">" => 48
672 DEFAULT => -69
674 {#State 26
675 ACTIONS => {
676 "," => 49,
677 ")" => 50
680 {#State 27
681 DEFAULT => -75
683 {#State 28
684 DEFAULT => -95
686 {#State 29
687 DEFAULT => -66
689 {#State 30
690 DEFAULT => -9
692 {#State 31
693 ACTIONS => {
694 "typedef" => 51,
695 "union" => 52,
696 "enum" => 65,
697 "bitmap" => 66,
698 "declare" => 58,
699 "const" => 60,
700 "struct" => 63
702 DEFAULT => -63,
703 GOTOS => {
704 'typedecl' => 64,
705 'function' => 53,
706 'bitmap' => 67,
707 'definitions' => 54,
708 'definition' => 57,
709 'property_list' => 56,
710 'usertype' => 55,
711 'declare' => 69,
712 'const' => 68,
713 'struct' => 59,
714 'enum' => 61,
715 'typedef' => 62,
716 'union' => 70
719 {#State 32
720 ACTIONS => {
721 ";" => 71
723 DEFAULT => -97,
724 GOTOS => {
725 'optional_semicolon' => 72
728 {#State 33
729 ACTIONS => {
730 'IDENTIFIER' => 9
732 GOTOS => {
733 'identifier' => 73
736 {#State 34
737 ACTIONS => {
738 'CONSTANT' => 28,
739 'TEXT' => 22,
740 'IDENTIFIER' => 9
742 DEFAULT => -73,
743 GOTOS => {
744 'identifier' => 23,
745 'anytext' => 74,
746 'text' => 24,
747 'constant' => 27
750 {#State 35
751 ACTIONS => {
752 'CONSTANT' => 28,
753 'TEXT' => 22,
754 'IDENTIFIER' => 9
756 DEFAULT => -73,
757 GOTOS => {
758 'identifier' => 23,
759 'anytext' => 75,
760 'text' => 24,
761 'constant' => 27
764 {#State 36
765 ACTIONS => {
766 'CONSTANT' => 28,
767 'TEXT' => 22,
768 'IDENTIFIER' => 9
770 DEFAULT => -73,
771 GOTOS => {
772 'identifier' => 23,
773 'anytext' => 76,
774 'text' => 24,
775 'constant' => 27
778 {#State 37
779 ACTIONS => {
780 'CONSTANT' => 28,
781 'TEXT' => 22,
782 'IDENTIFIER' => 9
784 DEFAULT => -73,
785 GOTOS => {
786 'identifier' => 23,
787 'anytext' => 77,
788 'text' => 24,
789 'constant' => 27
792 {#State 38
793 ACTIONS => {
794 'CONSTANT' => 28,
795 'TEXT' => 22,
796 'IDENTIFIER' => 9
798 DEFAULT => -73,
799 GOTOS => {
800 'identifier' => 23,
801 'anytext' => 78,
802 'text' => 24,
803 'constant' => 27
806 {#State 39
807 ACTIONS => {
808 'CONSTANT' => 28,
809 'TEXT' => 22,
810 'IDENTIFIER' => 9
812 DEFAULT => -73,
813 GOTOS => {
814 'identifier' => 23,
815 'anytext' => 79,
816 'text' => 24,
817 'constant' => 27
820 {#State 40
821 ACTIONS => {
822 'CONSTANT' => 28,
823 'TEXT' => 22,
824 'IDENTIFIER' => 9
826 DEFAULT => -73,
827 GOTOS => {
828 'identifier' => 23,
829 'anytext' => 80,
830 'text' => 24,
831 'constant' => 27,
832 'commalisttext' => 81
835 {#State 41
836 ACTIONS => {
837 'CONSTANT' => 28,
838 'TEXT' => 22,
839 'IDENTIFIER' => 9
841 DEFAULT => -73,
842 GOTOS => {
843 'identifier' => 23,
844 'anytext' => 82,
845 'text' => 24,
846 'constant' => 27
849 {#State 42
850 ACTIONS => {
851 'CONSTANT' => 28,
852 'TEXT' => 22,
853 'IDENTIFIER' => 9
855 DEFAULT => -73,
856 GOTOS => {
857 'identifier' => 23,
858 'anytext' => 83,
859 'text' => 24,
860 'constant' => 27
863 {#State 43
864 ACTIONS => {
865 'CONSTANT' => 28,
866 'TEXT' => 22,
867 'IDENTIFIER' => 9
869 DEFAULT => -73,
870 GOTOS => {
871 'identifier' => 23,
872 'anytext' => 84,
873 'text' => 24,
874 'constant' => 27
877 {#State 44
878 ACTIONS => {
879 'CONSTANT' => 28,
880 'TEXT' => 22,
881 'IDENTIFIER' => 9
883 DEFAULT => -73,
884 GOTOS => {
885 'identifier' => 23,
886 'anytext' => 80,
887 'text' => 24,
888 'constant' => 27,
889 'commalisttext' => 85
892 {#State 45
893 ACTIONS => {
894 'CONSTANT' => 28,
895 'TEXT' => 22,
896 'IDENTIFIER' => 9
898 DEFAULT => -73,
899 GOTOS => {
900 'identifier' => 23,
901 'anytext' => 86,
902 'text' => 24,
903 'constant' => 27
906 {#State 46
907 ACTIONS => {
908 'CONSTANT' => 28,
909 'TEXT' => 22,
910 'IDENTIFIER' => 9
912 DEFAULT => -73,
913 GOTOS => {
914 'identifier' => 23,
915 'anytext' => 87,
916 'text' => 24,
917 'constant' => 27
920 {#State 47
921 ACTIONS => {
922 'CONSTANT' => 28,
923 'TEXT' => 22,
924 'IDENTIFIER' => 9
926 DEFAULT => -73,
927 GOTOS => {
928 'identifier' => 23,
929 'anytext' => 88,
930 'text' => 24,
931 'constant' => 27
934 {#State 48
935 ACTIONS => {
936 'CONSTANT' => 28,
937 'TEXT' => 22,
938 'IDENTIFIER' => 9
940 DEFAULT => -73,
941 GOTOS => {
942 'identifier' => 23,
943 'anytext' => 89,
944 'text' => 24,
945 'constant' => 27
948 {#State 49
949 ACTIONS => {
950 'CONSTANT' => 28,
951 'TEXT' => 22,
952 'IDENTIFIER' => 9
954 DEFAULT => -73,
955 GOTOS => {
956 'identifier' => 23,
957 'anytext' => 90,
958 'text' => 24,
959 'constant' => 27
962 {#State 50
963 DEFAULT => -68
965 {#State 51
966 DEFAULT => -63,
967 GOTOS => {
968 'property_list' => 91
971 {#State 52
972 ACTIONS => {
973 'IDENTIFIER' => 92
975 DEFAULT => -94,
976 GOTOS => {
977 'optional_identifier' => 93
980 {#State 53
981 DEFAULT => -12
983 {#State 54
984 ACTIONS => {
985 "}" => 94,
986 "typedef" => 51,
987 "union" => 52,
988 "enum" => 65,
989 "bitmap" => 66,
990 "declare" => 58,
991 "const" => 60,
992 "struct" => 63
994 DEFAULT => -63,
995 GOTOS => {
996 'typedecl' => 64,
997 'function' => 53,
998 'bitmap' => 67,
999 'definition' => 95,
1000 'property_list' => 56,
1001 'usertype' => 55,
1002 'const' => 68,
1003 'struct' => 59,
1004 'declare' => 69,
1005 'enum' => 61,
1006 'typedef' => 62,
1007 'union' => 70
1010 {#State 55
1011 ACTIONS => {
1012 ";" => 96
1015 {#State 56
1016 ACTIONS => {
1017 'IDENTIFIER' => 9,
1018 "union" => 52,
1019 "enum" => 65,
1020 "bitmap" => 66,
1021 "[" => 7,
1022 'void' => 97,
1023 "struct" => 63
1025 GOTOS => {
1026 'identifier' => 99,
1027 'struct' => 59,
1028 'enum' => 61,
1029 'type' => 100,
1030 'union' => 70,
1031 'bitmap' => 67,
1032 'usertype' => 98
1035 {#State 57
1036 DEFAULT => -10
1038 {#State 58
1039 DEFAULT => -63,
1040 GOTOS => {
1041 'property_list' => 101
1044 {#State 59
1045 DEFAULT => -26
1047 {#State 60
1048 ACTIONS => {
1049 'IDENTIFIER' => 9
1051 GOTOS => {
1052 'identifier' => 102
1055 {#State 61
1056 DEFAULT => -28
1058 {#State 62
1059 DEFAULT => -14
1061 {#State 63
1062 ACTIONS => {
1063 'IDENTIFIER' => 92
1065 DEFAULT => -94,
1066 GOTOS => {
1067 'optional_identifier' => 103
1070 {#State 64
1071 DEFAULT => -16
1073 {#State 65
1074 ACTIONS => {
1075 'IDENTIFIER' => 92
1077 DEFAULT => -94,
1078 GOTOS => {
1079 'optional_identifier' => 104
1082 {#State 66
1083 ACTIONS => {
1084 'IDENTIFIER' => 92
1086 DEFAULT => -94,
1087 GOTOS => {
1088 'optional_identifier' => 105
1091 {#State 67
1092 DEFAULT => -29
1094 {#State 68
1095 DEFAULT => -13
1097 {#State 69
1098 DEFAULT => -15
1100 {#State 70
1101 DEFAULT => -27
1103 {#State 71
1104 DEFAULT => -98
1106 {#State 72
1107 DEFAULT => -4
1109 {#State 73
1110 ACTIONS => {
1111 ";" => 106
1114 {#State 74
1115 ACTIONS => {
1116 "-" => 35,
1117 ":" => 34,
1118 "<" => 37,
1119 "+" => 39,
1120 "~" => 38,
1121 "*" => 46,
1122 "?" => 36,
1123 "{" => 40,
1124 "&" => 41,
1125 "/" => 42,
1126 "=" => 43,
1127 "(" => 44,
1128 "|" => 45,
1129 "." => 47,
1130 ">" => 48
1132 DEFAULT => -86
1134 {#State 75
1135 ACTIONS => {
1136 ":" => 34,
1137 "<" => 37,
1138 "~" => 38,
1139 "?" => 36,
1140 "{" => 40,
1141 "=" => 43
1143 DEFAULT => -77
1145 {#State 76
1146 ACTIONS => {
1147 "-" => 35,
1148 ":" => 34,
1149 "<" => 37,
1150 "+" => 39,
1151 "~" => 38,
1152 "*" => 46,
1153 "?" => 36,
1154 "{" => 40,
1155 "&" => 41,
1156 "/" => 42,
1157 "=" => 43,
1158 "(" => 44,
1159 "|" => 45,
1160 "." => 47,
1161 ">" => 48
1163 DEFAULT => -85
1165 {#State 77
1166 ACTIONS => {
1167 "-" => 35,
1168 ":" => 34,
1169 "<" => 37,
1170 "+" => 39,
1171 "~" => 38,
1172 "*" => 46,
1173 "?" => 36,
1174 "{" => 40,
1175 "&" => 41,
1176 "/" => 42,
1177 "=" => 43,
1178 "(" => 44,
1179 "|" => 45,
1180 "." => 47,
1181 ">" => 48
1183 DEFAULT => -81
1185 {#State 78
1186 ACTIONS => {
1187 "-" => 35,
1188 ":" => 34,
1189 "<" => 37,
1190 "+" => 39,
1191 "~" => 38,
1192 "*" => 46,
1193 "?" => 36,
1194 "{" => 40,
1195 "&" => 41,
1196 "/" => 42,
1197 "=" => 43,
1198 "(" => 44,
1199 "|" => 45,
1200 "." => 47,
1201 ">" => 48
1203 DEFAULT => -89
1205 {#State 79
1206 ACTIONS => {
1207 ":" => 34,
1208 "<" => 37,
1209 "~" => 38,
1210 "?" => 36,
1211 "{" => 40,
1212 "=" => 43
1214 DEFAULT => -88
1216 {#State 80
1217 ACTIONS => {
1218 "-" => 35,
1219 ":" => 34,
1220 "<" => 37,
1221 "+" => 39,
1222 "~" => 38,
1223 "*" => 46,
1224 "?" => 36,
1225 "{" => 40,
1226 "&" => 41,
1227 "/" => 42,
1228 "=" => 43,
1229 "(" => 44,
1230 "|" => 45,
1231 "." => 47,
1232 ">" => 48
1234 DEFAULT => -71
1236 {#State 81
1237 ACTIONS => {
1238 "}" => 107,
1239 "," => 108
1242 {#State 82
1243 ACTIONS => {
1244 ":" => 34,
1245 "<" => 37,
1246 "~" => 38,
1247 "?" => 36,
1248 "{" => 40,
1249 "=" => 43
1251 DEFAULT => -83
1253 {#State 83
1254 ACTIONS => {
1255 ":" => 34,
1256 "<" => 37,
1257 "~" => 38,
1258 "?" => 36,
1259 "{" => 40,
1260 "=" => 43
1262 DEFAULT => -84
1264 {#State 84
1265 ACTIONS => {
1266 "-" => 35,
1267 ":" => 34,
1268 "<" => 37,
1269 "+" => 39,
1270 "~" => 38,
1271 "*" => 46,
1272 "?" => 36,
1273 "{" => 40,
1274 "&" => 41,
1275 "/" => 42,
1276 "=" => 43,
1277 "(" => 44,
1278 "|" => 45,
1279 "." => 47,
1280 ">" => 48
1282 DEFAULT => -87
1284 {#State 85
1285 ACTIONS => {
1286 "," => 108,
1287 ")" => 109
1290 {#State 86
1291 ACTIONS => {
1292 ":" => 34,
1293 "<" => 37,
1294 "~" => 38,
1295 "?" => 36,
1296 "{" => 40,
1297 "=" => 43
1299 DEFAULT => -82
1301 {#State 87
1302 ACTIONS => {
1303 ":" => 34,
1304 "<" => 37,
1305 "~" => 38,
1306 "?" => 36,
1307 "{" => 40,
1308 "=" => 43
1310 DEFAULT => -79
1312 {#State 88
1313 ACTIONS => {
1314 ":" => 34,
1315 "<" => 37,
1316 "~" => 38,
1317 "?" => 36,
1318 "{" => 40,
1319 "=" => 43
1321 DEFAULT => -78
1323 {#State 89
1324 ACTIONS => {
1325 ":" => 34,
1326 "<" => 37,
1327 "~" => 38,
1328 "?" => 36,
1329 "{" => 40,
1330 "=" => 43
1332 DEFAULT => -80
1334 {#State 90
1335 ACTIONS => {
1336 "-" => 35,
1337 ":" => 34,
1338 "<" => 37,
1339 "+" => 39,
1340 "~" => 38,
1341 "*" => 46,
1342 "?" => 36,
1343 "{" => 40,
1344 "&" => 41,
1345 "/" => 42,
1346 "=" => 43,
1347 "(" => 44,
1348 "|" => 45,
1349 "." => 47,
1350 ">" => 48
1352 DEFAULT => -70
1354 {#State 91
1355 ACTIONS => {
1356 'IDENTIFIER' => 9,
1357 "union" => 52,
1358 "enum" => 65,
1359 "bitmap" => 66,
1360 "[" => 7,
1361 'void' => 97,
1362 "struct" => 63
1364 GOTOS => {
1365 'identifier' => 99,
1366 'struct' => 59,
1367 'enum' => 61,
1368 'type' => 110,
1369 'union' => 70,
1370 'bitmap' => 67,
1371 'usertype' => 98
1374 {#State 92
1375 DEFAULT => -93
1377 {#State 93
1378 ACTIONS => {
1379 "{" => 111
1382 {#State 94
1383 ACTIONS => {
1384 ";" => 71
1386 DEFAULT => -97,
1387 GOTOS => {
1388 'optional_semicolon' => 112
1391 {#State 95
1392 DEFAULT => -11
1394 {#State 96
1395 DEFAULT => -30
1397 {#State 97
1398 DEFAULT => -33
1400 {#State 98
1401 DEFAULT => -31
1403 {#State 99
1404 DEFAULT => -32
1406 {#State 100
1407 ACTIONS => {
1408 'IDENTIFIER' => 9
1410 GOTOS => {
1411 'identifier' => 113
1414 {#State 101
1415 ACTIONS => {
1416 "enum" => 117,
1417 "bitmap" => 118,
1418 "[" => 7
1420 GOTOS => {
1421 'decl_enum' => 114,
1422 'decl_bitmap' => 115,
1423 'decl_type' => 116
1426 {#State 102
1427 ACTIONS => {
1428 'IDENTIFIER' => 9
1430 GOTOS => {
1431 'identifier' => 119
1434 {#State 103
1435 ACTIONS => {
1436 "{" => 120
1439 {#State 104
1440 ACTIONS => {
1441 "{" => 121
1444 {#State 105
1445 ACTIONS => {
1446 "{" => 122
1449 {#State 106
1450 DEFAULT => -6
1452 {#State 107
1453 ACTIONS => {
1454 'CONSTANT' => 28,
1455 'TEXT' => 22,
1456 'IDENTIFIER' => 9
1458 DEFAULT => -73,
1459 GOTOS => {
1460 'identifier' => 23,
1461 'anytext' => 123,
1462 'text' => 24,
1463 'constant' => 27
1466 {#State 108
1467 ACTIONS => {
1468 'CONSTANT' => 28,
1469 'TEXT' => 22,
1470 'IDENTIFIER' => 9
1472 DEFAULT => -73,
1473 GOTOS => {
1474 'identifier' => 23,
1475 'anytext' => 124,
1476 'text' => 24,
1477 'constant' => 27
1480 {#State 109
1481 ACTIONS => {
1482 'CONSTANT' => 28,
1483 'TEXT' => 22,
1484 'IDENTIFIER' => 9
1486 DEFAULT => -73,
1487 GOTOS => {
1488 'identifier' => 23,
1489 'anytext' => 125,
1490 'text' => 24,
1491 'constant' => 27
1494 {#State 110
1495 ACTIONS => {
1496 'IDENTIFIER' => 9
1498 GOTOS => {
1499 'identifier' => 126
1502 {#State 111
1503 DEFAULT => -48,
1504 GOTOS => {
1505 'union_elements' => 127
1508 {#State 112
1509 DEFAULT => -7
1511 {#State 113
1512 ACTIONS => {
1513 "(" => 128
1516 {#State 114
1517 DEFAULT => -21
1519 {#State 115
1520 DEFAULT => -22
1522 {#State 116
1523 ACTIONS => {
1524 'IDENTIFIER' => 9
1526 GOTOS => {
1527 'identifier' => 129
1530 {#State 117
1531 DEFAULT => -23
1533 {#State 118
1534 DEFAULT => -24
1536 {#State 119
1537 ACTIONS => {
1538 "[" => 130,
1539 "=" => 132
1541 GOTOS => {
1542 'array_len' => 131
1545 {#State 120
1546 DEFAULT => -54,
1547 GOTOS => {
1548 'element_list1' => 133
1551 {#State 121
1552 ACTIONS => {
1553 'IDENTIFIER' => 9
1555 GOTOS => {
1556 'identifier' => 134,
1557 'enum_element' => 135,
1558 'enum_elements' => 136
1561 {#State 122
1562 ACTIONS => {
1563 'IDENTIFIER' => 9
1565 GOTOS => {
1566 'identifier' => 139,
1567 'bitmap_elements' => 138,
1568 'bitmap_element' => 137
1571 {#State 123
1572 ACTIONS => {
1573 "-" => 35,
1574 ":" => 34,
1575 "<" => 37,
1576 "+" => 39,
1577 "~" => 38,
1578 "*" => 46,
1579 "?" => 36,
1580 "{" => 40,
1581 "&" => 41,
1582 "/" => 42,
1583 "=" => 43,
1584 "(" => 44,
1585 "|" => 45,
1586 "." => 47,
1587 ">" => 48
1589 DEFAULT => -91
1591 {#State 124
1592 ACTIONS => {
1593 "-" => 35,
1594 ":" => 34,
1595 "<" => 37,
1596 "+" => 39,
1597 "~" => 38,
1598 "*" => 46,
1599 "?" => 36,
1600 "{" => 40,
1601 "&" => 41,
1602 "/" => 42,
1603 "=" => 43,
1604 "(" => 44,
1605 "|" => 45,
1606 "." => 47,
1607 ">" => 48
1609 DEFAULT => -72
1611 {#State 125
1612 ACTIONS => {
1613 ":" => 34,
1614 "<" => 37,
1615 "~" => 38,
1616 "?" => 36,
1617 "{" => 40,
1618 "=" => 43
1620 DEFAULT => -90
1622 {#State 126
1623 ACTIONS => {
1624 "[" => 130
1626 DEFAULT => -60,
1627 GOTOS => {
1628 'array_len' => 140
1631 {#State 127
1632 ACTIONS => {
1633 "}" => 141
1635 DEFAULT => -63,
1636 GOTOS => {
1637 'optional_base_element' => 143,
1638 'property_list' => 142
1641 {#State 128
1642 ACTIONS => {
1643 "," => -56,
1644 "void" => 147,
1645 ")" => -56
1647 DEFAULT => -63,
1648 GOTOS => {
1649 'base_element' => 144,
1650 'element_list2' => 146,
1651 'property_list' => 145
1654 {#State 129
1655 ACTIONS => {
1656 ";" => 148
1659 {#State 130
1660 ACTIONS => {
1661 'CONSTANT' => 28,
1662 'TEXT' => 22,
1663 "]" => 149,
1664 'IDENTIFIER' => 9
1666 DEFAULT => -73,
1667 GOTOS => {
1668 'identifier' => 23,
1669 'anytext' => 150,
1670 'text' => 24,
1671 'constant' => 27
1674 {#State 131
1675 ACTIONS => {
1676 "=" => 151
1679 {#State 132
1680 ACTIONS => {
1681 'CONSTANT' => 28,
1682 'TEXT' => 22,
1683 'IDENTIFIER' => 9
1685 DEFAULT => -73,
1686 GOTOS => {
1687 'identifier' => 23,
1688 'anytext' => 152,
1689 'text' => 24,
1690 'constant' => 27
1693 {#State 133
1694 ACTIONS => {
1695 "}" => 153
1697 DEFAULT => -63,
1698 GOTOS => {
1699 'base_element' => 154,
1700 'property_list' => 145
1703 {#State 134
1704 ACTIONS => {
1705 "=" => 155
1707 DEFAULT => -37
1709 {#State 135
1710 DEFAULT => -35
1712 {#State 136
1713 ACTIONS => {
1714 "}" => 156,
1715 "," => 157
1718 {#State 137
1719 DEFAULT => -40
1721 {#State 138
1722 ACTIONS => {
1723 "}" => 158,
1724 "," => 159
1727 {#State 139
1728 ACTIONS => {
1729 "=" => 160
1732 {#State 140
1733 ACTIONS => {
1734 ";" => 161
1737 {#State 141
1738 DEFAULT => -50
1740 {#State 142
1741 ACTIONS => {
1742 "[" => 7
1744 DEFAULT => -63,
1745 GOTOS => {
1746 'base_or_empty' => 162,
1747 'base_element' => 163,
1748 'empty_element' => 164,
1749 'property_list' => 165
1752 {#State 143
1753 DEFAULT => -49
1755 {#State 144
1756 DEFAULT => -58
1758 {#State 145
1759 ACTIONS => {
1760 'IDENTIFIER' => 9,
1761 "union" => 52,
1762 "enum" => 65,
1763 "bitmap" => 66,
1764 "[" => 7,
1765 'void' => 97,
1766 "struct" => 63
1768 GOTOS => {
1769 'identifier' => 99,
1770 'struct' => 59,
1771 'enum' => 61,
1772 'type' => 166,
1773 'union' => 70,
1774 'bitmap' => 67,
1775 'usertype' => 98
1778 {#State 146
1779 ACTIONS => {
1780 "," => 167,
1781 ")" => 168
1784 {#State 147
1785 DEFAULT => -57
1787 {#State 148
1788 DEFAULT => -20
1790 {#State 149
1791 ACTIONS => {
1792 "[" => 130
1794 DEFAULT => -60,
1795 GOTOS => {
1796 'array_len' => 169
1799 {#State 150
1800 ACTIONS => {
1801 "-" => 35,
1802 ":" => 34,
1803 "?" => 36,
1804 "<" => 37,
1805 "+" => 39,
1806 "~" => 38,
1807 "&" => 41,
1808 "{" => 40,
1809 "/" => 42,
1810 "=" => 43,
1811 "|" => 45,
1812 "(" => 44,
1813 "*" => 46,
1814 "." => 47,
1815 "]" => 170,
1816 ">" => 48
1819 {#State 151
1820 ACTIONS => {
1821 'CONSTANT' => 28,
1822 'TEXT' => 22,
1823 'IDENTIFIER' => 9
1825 DEFAULT => -73,
1826 GOTOS => {
1827 'identifier' => 23,
1828 'anytext' => 171,
1829 'text' => 24,
1830 'constant' => 27
1833 {#State 152
1834 ACTIONS => {
1835 "-" => 35,
1836 ":" => 34,
1837 "?" => 36,
1838 "<" => 37,
1839 ";" => 172,
1840 "+" => 39,
1841 "~" => 38,
1842 "&" => 41,
1843 "{" => 40,
1844 "/" => 42,
1845 "=" => 43,
1846 "|" => 45,
1847 "(" => 44,
1848 "*" => 46,
1849 "." => 47,
1850 ">" => 48
1853 {#State 153
1854 DEFAULT => -43
1856 {#State 154
1857 ACTIONS => {
1858 ";" => 173
1861 {#State 155
1862 ACTIONS => {
1863 'CONSTANT' => 28,
1864 'TEXT' => 22,
1865 'IDENTIFIER' => 9
1867 DEFAULT => -73,
1868 GOTOS => {
1869 'identifier' => 23,
1870 'anytext' => 174,
1871 'text' => 24,
1872 'constant' => 27
1875 {#State 156
1876 DEFAULT => -34
1878 {#State 157
1879 ACTIONS => {
1880 'IDENTIFIER' => 9
1882 GOTOS => {
1883 'identifier' => 134,
1884 'enum_element' => 175
1887 {#State 158
1888 DEFAULT => -39
1890 {#State 159
1891 ACTIONS => {
1892 'IDENTIFIER' => 9
1894 GOTOS => {
1895 'identifier' => 139,
1896 'bitmap_element' => 176
1899 {#State 160
1900 ACTIONS => {
1901 'CONSTANT' => 28,
1902 'TEXT' => 22,
1903 'IDENTIFIER' => 9
1905 DEFAULT => -73,
1906 GOTOS => {
1907 'identifier' => 23,
1908 'anytext' => 177,
1909 'text' => 24,
1910 'constant' => 27
1913 {#State 161
1914 DEFAULT => -25
1916 {#State 162
1917 DEFAULT => -47
1919 {#State 163
1920 ACTIONS => {
1921 ";" => 178
1924 {#State 164
1925 DEFAULT => -46
1927 {#State 165
1928 ACTIONS => {
1929 'IDENTIFIER' => 9,
1930 "union" => 52,
1931 ";" => 179,
1932 "enum" => 65,
1933 "bitmap" => 66,
1934 'void' => 97,
1935 "[" => 7,
1936 "struct" => 63
1938 GOTOS => {
1939 'identifier' => 99,
1940 'struct' => 59,
1941 'enum' => 61,
1942 'type' => 166,
1943 'union' => 70,
1944 'bitmap' => 67,
1945 'usertype' => 98
1948 {#State 166
1949 DEFAULT => -52,
1950 GOTOS => {
1951 'pointers' => 180
1954 {#State 167
1955 DEFAULT => -63,
1956 GOTOS => {
1957 'base_element' => 181,
1958 'property_list' => 145
1961 {#State 168
1962 ACTIONS => {
1963 ";" => 182
1966 {#State 169
1967 DEFAULT => -61
1969 {#State 170
1970 ACTIONS => {
1971 "[" => 130
1973 DEFAULT => -60,
1974 GOTOS => {
1975 'array_len' => 183
1978 {#State 171
1979 ACTIONS => {
1980 "-" => 35,
1981 ":" => 34,
1982 "?" => 36,
1983 "<" => 37,
1984 ";" => 184,
1985 "+" => 39,
1986 "~" => 38,
1987 "&" => 41,
1988 "{" => 40,
1989 "/" => 42,
1990 "=" => 43,
1991 "|" => 45,
1992 "(" => 44,
1993 "*" => 46,
1994 "." => 47,
1995 ">" => 48
1998 {#State 172
1999 DEFAULT => -17
2001 {#State 173
2002 DEFAULT => -55
2004 {#State 174
2005 ACTIONS => {
2006 "-" => 35,
2007 ":" => 34,
2008 "<" => 37,
2009 "+" => 39,
2010 "~" => 38,
2011 "*" => 46,
2012 "?" => 36,
2013 "{" => 40,
2014 "&" => 41,
2015 "/" => 42,
2016 "=" => 43,
2017 "(" => 44,
2018 "|" => 45,
2019 "." => 47,
2020 ">" => 48
2022 DEFAULT => -38
2024 {#State 175
2025 DEFAULT => -36
2027 {#State 176
2028 DEFAULT => -41
2030 {#State 177
2031 ACTIONS => {
2032 "-" => 35,
2033 ":" => 34,
2034 "<" => 37,
2035 "+" => 39,
2036 "~" => 38,
2037 "*" => 46,
2038 "?" => 36,
2039 "{" => 40,
2040 "&" => 41,
2041 "/" => 42,
2042 "=" => 43,
2043 "(" => 44,
2044 "|" => 45,
2045 "." => 47,
2046 ">" => 48
2048 DEFAULT => -42
2050 {#State 178
2051 DEFAULT => -45
2053 {#State 179
2054 DEFAULT => -44
2056 {#State 180
2057 ACTIONS => {
2058 'IDENTIFIER' => 9,
2059 "*" => 186
2061 GOTOS => {
2062 'identifier' => 185
2065 {#State 181
2066 DEFAULT => -59
2068 {#State 182
2069 DEFAULT => -19
2071 {#State 183
2072 DEFAULT => -62
2074 {#State 184
2075 DEFAULT => -18
2077 {#State 185
2078 ACTIONS => {
2079 "[" => 130
2081 DEFAULT => -60,
2082 GOTOS => {
2083 'array_len' => 187
2086 {#State 186
2087 DEFAULT => -53
2089 {#State 187
2090 DEFAULT => -51
2093 yyrules =>
2095 [#Rule 0
2096 '$start', 2, undef
2098 [#Rule 1
2099 'idl', 0, undef
2101 [#Rule 2
2102 'idl', 2,
2104 #line 19 "pidl/idl.yp"
2105 { push(@{$_[1]}, $_[2]); $_[1] }
2107 [#Rule 3
2108 'idl', 2,
2110 #line 20 "pidl/idl.yp"
2111 { push(@{$_[1]}, $_[2]); $_[1] }
2113 [#Rule 4
2114 'coclass', 7,
2116 #line 24 "pidl/idl.yp"
2117 {$_[3] => {
2118 "TYPE" => "COCLASS",
2119 "PROPERTIES" => $_[1],
2120 "NAME" => $_[3],
2121 "DATA" => $_[5],
2122 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2123 "LINE" => $_[0]->YYData->{LINE},
2126 [#Rule 5
2127 'interface_names', 0, undef
2129 [#Rule 6
2130 'interface_names', 4,
2132 #line 36 "pidl/idl.yp"
2133 { push(@{$_[1]}, $_[2]); $_[1] }
2135 [#Rule 7
2136 'interface', 8,
2138 #line 40 "pidl/idl.yp"
2139 {$_[3] => {
2140 "TYPE" => "INTERFACE",
2141 "PROPERTIES" => $_[1],
2142 "NAME" => $_[3],
2143 "BASE" => $_[4],
2144 "DATA" => $_[6],
2145 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2146 "LINE" => $_[0]->YYData->{LINE},
2149 [#Rule 8
2150 'base_interface', 0, undef
2152 [#Rule 9
2153 'base_interface', 2,
2155 #line 53 "pidl/idl.yp"
2156 { $_[2] }
2158 [#Rule 10
2159 'definitions', 1,
2161 #line 57 "pidl/idl.yp"
2162 { [ $_[1] ] }
2164 [#Rule 11
2165 'definitions', 2,
2167 #line 58 "pidl/idl.yp"
2168 { push(@{$_[1]}, $_[2]); $_[1] }
2170 [#Rule 12
2171 'definition', 1, undef
2173 [#Rule 13
2174 'definition', 1, undef
2176 [#Rule 14
2177 'definition', 1, undef
2179 [#Rule 15
2180 'definition', 1, undef
2182 [#Rule 16
2183 'definition', 1, undef
2185 [#Rule 17
2186 'const', 6,
2188 #line 66 "pidl/idl.yp"
2190 "TYPE" => "CONST",
2191 "DTYPE" => $_[2],
2192 "NAME" => $_[3],
2193 "VALUE" => $_[5],
2194 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2195 "LINE" => $_[0]->YYData->{LINE},
2198 [#Rule 18
2199 'const', 7,
2201 #line 75 "pidl/idl.yp"
2203 "TYPE" => "CONST",
2204 "DTYPE" => $_[2],
2205 "NAME" => $_[3],
2206 "ARRAY_LEN" => $_[4],
2207 "VALUE" => $_[6],
2208 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2209 "LINE" => $_[0]->YYData->{LINE},
2212 [#Rule 19
2213 'function', 7,
2215 #line 88 "pidl/idl.yp"
2217 "TYPE" => "FUNCTION",
2218 "NAME" => $_[3],
2219 "RETURN_TYPE" => $_[2],
2220 "PROPERTIES" => $_[1],
2221 "ELEMENTS" => $_[5],
2222 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2223 "LINE" => $_[0]->YYData->{LINE},
2226 [#Rule 20
2227 'declare', 5,
2229 #line 100 "pidl/idl.yp"
2231 "TYPE" => "DECLARE",
2232 "PROPERTIES" => $_[2],
2233 "NAME" => $_[4],
2234 "DATA" => $_[3],
2235 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2236 "LINE" => $_[0]->YYData->{LINE},
2239 [#Rule 21
2240 'decl_type', 1, undef
2242 [#Rule 22
2243 'decl_type', 1, undef
2245 [#Rule 23
2246 'decl_enum', 1,
2248 #line 114 "pidl/idl.yp"
2250 "TYPE" => "ENUM"
2253 [#Rule 24
2254 'decl_bitmap', 1,
2256 #line 120 "pidl/idl.yp"
2258 "TYPE" => "BITMAP"
2261 [#Rule 25
2262 'typedef', 6,
2264 #line 126 "pidl/idl.yp"
2266 "TYPE" => "TYPEDEF",
2267 "PROPERTIES" => $_[2],
2268 "NAME" => $_[4],
2269 "DATA" => $_[3],
2270 "ARRAY_LEN" => $_[5],
2271 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2272 "LINE" => $_[0]->YYData->{LINE},
2275 [#Rule 26
2276 'usertype', 1, undef
2278 [#Rule 27
2279 'usertype', 1, undef
2281 [#Rule 28
2282 'usertype', 1, undef
2284 [#Rule 29
2285 'usertype', 1, undef
2287 [#Rule 30
2288 'typedecl', 2,
2290 #line 139 "pidl/idl.yp"
2291 { $_[1] }
2293 [#Rule 31
2294 'type', 1, undef
2296 [#Rule 32
2297 'type', 1, undef
2299 [#Rule 33
2300 'type', 1,
2302 #line 142 "pidl/idl.yp"
2303 { "void" }
2305 [#Rule 34
2306 'enum', 5,
2308 #line 146 "pidl/idl.yp"
2310 "TYPE" => "ENUM",
2311 "NAME" => $_[2],
2312 "ELEMENTS" => $_[4]
2315 [#Rule 35
2316 'enum_elements', 1,
2318 #line 154 "pidl/idl.yp"
2319 { [ $_[1] ] }
2321 [#Rule 36
2322 'enum_elements', 3,
2324 #line 155 "pidl/idl.yp"
2325 { push(@{$_[1]}, $_[3]); $_[1] }
2327 [#Rule 37
2328 'enum_element', 1, undef
2330 [#Rule 38
2331 'enum_element', 3,
2333 #line 159 "pidl/idl.yp"
2334 { "$_[1]$_[2]$_[3]" }
2336 [#Rule 39
2337 'bitmap', 5,
2339 #line 163 "pidl/idl.yp"
2341 "TYPE" => "BITMAP",
2342 "NAME" => $_[2],
2343 "ELEMENTS" => $_[4]
2346 [#Rule 40
2347 'bitmap_elements', 1,
2349 #line 171 "pidl/idl.yp"
2350 { [ $_[1] ] }
2352 [#Rule 41
2353 'bitmap_elements', 3,
2355 #line 172 "pidl/idl.yp"
2356 { push(@{$_[1]}, $_[3]); $_[1] }
2358 [#Rule 42
2359 'bitmap_element', 3,
2361 #line 175 "pidl/idl.yp"
2362 { "$_[1] ( $_[3] )" }
2364 [#Rule 43
2365 'struct', 5,
2367 #line 179 "pidl/idl.yp"
2369 "TYPE" => "STRUCT",
2370 "NAME" => $_[2],
2371 "ELEMENTS" => $_[4]
2374 [#Rule 44
2375 'empty_element', 2,
2377 #line 187 "pidl/idl.yp"
2379 "NAME" => "",
2380 "TYPE" => "EMPTY",
2381 "PROPERTIES" => $_[1],
2382 "POINTERS" => 0,
2383 "ARRAY_LEN" => [],
2384 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2385 "LINE" => $_[0]->YYData->{LINE},
2388 [#Rule 45
2389 'base_or_empty', 2, undef
2391 [#Rule 46
2392 'base_or_empty', 1, undef
2394 [#Rule 47
2395 'optional_base_element', 2,
2397 #line 201 "pidl/idl.yp"
2398 { $_[2]->{PROPERTIES} = Parse::Pidl::Util::FlattenHash([$_[1],$_[2]->{PROPERTIES}]); $_[2] }
2400 [#Rule 48
2401 'union_elements', 0, undef
2403 [#Rule 49
2404 'union_elements', 2,
2406 #line 206 "pidl/idl.yp"
2407 { push(@{$_[1]}, $_[2]); $_[1] }
2409 [#Rule 50
2410 'union', 5,
2412 #line 210 "pidl/idl.yp"
2414 "TYPE" => "UNION",
2415 "NAME" => $_[2],
2416 "ELEMENTS" => $_[4]
2419 [#Rule 51
2420 'base_element', 5,
2422 #line 218 "pidl/idl.yp"
2424 "NAME" => $_[4],
2425 "TYPE" => $_[2],
2426 "PROPERTIES" => $_[1],
2427 "POINTERS" => $_[3],
2428 "ARRAY_LEN" => $_[5],
2429 "FILE" => $_[0]->YYData->{INPUT_FILENAME},
2430 "LINE" => $_[0]->YYData->{LINE},
2433 [#Rule 52
2434 'pointers', 0,
2436 #line 232 "pidl/idl.yp"
2437 { 0 }
2439 [#Rule 53
2440 'pointers', 2,
2442 #line 233 "pidl/idl.yp"
2443 { $_[1]+1 }
2445 [#Rule 54
2446 'element_list1', 0, undef
2448 [#Rule 55
2449 'element_list1', 3,
2451 #line 238 "pidl/idl.yp"
2452 { push(@{$_[1]}, $_[2]); $_[1] }
2454 [#Rule 56
2455 'element_list2', 0, undef
2457 [#Rule 57
2458 'element_list2', 1, undef
2460 [#Rule 58
2461 'element_list2', 1,
2463 #line 244 "pidl/idl.yp"
2464 { [ $_[1] ] }
2466 [#Rule 59
2467 'element_list2', 3,
2469 #line 245 "pidl/idl.yp"
2470 { push(@{$_[1]}, $_[3]); $_[1] }
2472 [#Rule 60
2473 'array_len', 0, undef
2475 [#Rule 61
2476 'array_len', 3,
2478 #line 250 "pidl/idl.yp"
2479 { push(@{$_[3]}, "*"); $_[3] }
2481 [#Rule 62
2482 'array_len', 4,
2484 #line 251 "pidl/idl.yp"
2485 { push(@{$_[4]}, "$_[2]"); $_[4] }
2487 [#Rule 63
2488 'property_list', 0, undef
2490 [#Rule 64
2491 'property_list', 4,
2493 #line 257 "pidl/idl.yp"
2494 { Parse::Pidl::Util::FlattenHash([$_[1],$_[3]]); }
2496 [#Rule 65
2497 'properties', 1,
2499 #line 260 "pidl/idl.yp"
2500 { $_[1] }
2502 [#Rule 66
2503 'properties', 3,
2505 #line 261 "pidl/idl.yp"
2506 { Parse::Pidl::Util::FlattenHash([$_[1], $_[3]]); }
2508 [#Rule 67
2509 'property', 1,
2511 #line 264 "pidl/idl.yp"
2512 {{ "$_[1]" => "1" }}
2514 [#Rule 68
2515 'property', 4,
2517 #line 265 "pidl/idl.yp"
2518 {{ "$_[1]" => "$_[3]" }}
2520 [#Rule 69
2521 'listtext', 1, undef
2523 [#Rule 70
2524 'listtext', 3,
2526 #line 270 "pidl/idl.yp"
2527 { "$_[1] $_[3]" }
2529 [#Rule 71
2530 'commalisttext', 1, undef
2532 [#Rule 72
2533 'commalisttext', 3,
2535 #line 275 "pidl/idl.yp"
2536 { "$_[1],$_[3]" }
2538 [#Rule 73
2539 'anytext', 0,
2541 #line 279 "pidl/idl.yp"
2542 { "" }
2544 [#Rule 74
2545 'anytext', 1, undef
2547 [#Rule 75
2548 'anytext', 1, undef
2550 [#Rule 76
2551 'anytext', 1, undef
2553 [#Rule 77
2554 'anytext', 3,
2556 #line 281 "pidl/idl.yp"
2557 { "$_[1]$_[2]$_[3]" }
2559 [#Rule 78
2560 'anytext', 3,
2562 #line 282 "pidl/idl.yp"
2563 { "$_[1]$_[2]$_[3]" }
2565 [#Rule 79
2566 'anytext', 3,
2568 #line 283 "pidl/idl.yp"
2569 { "$_[1]$_[2]$_[3]" }
2571 [#Rule 80
2572 'anytext', 3,
2574 #line 284 "pidl/idl.yp"
2575 { "$_[1]$_[2]$_[3]" }
2577 [#Rule 81
2578 'anytext', 3,
2580 #line 285 "pidl/idl.yp"
2581 { "$_[1]$_[2]$_[3]" }
2583 [#Rule 82
2584 'anytext', 3,
2586 #line 286 "pidl/idl.yp"
2587 { "$_[1]$_[2]$_[3]" }
2589 [#Rule 83
2590 'anytext', 3,
2592 #line 287 "pidl/idl.yp"
2593 { "$_[1]$_[2]$_[3]" }
2595 [#Rule 84
2596 'anytext', 3,
2598 #line 288 "pidl/idl.yp"
2599 { "$_[1]$_[2]$_[3]" }
2601 [#Rule 85
2602 'anytext', 3,
2604 #line 289 "pidl/idl.yp"
2605 { "$_[1]$_[2]$_[3]" }
2607 [#Rule 86
2608 'anytext', 3,
2610 #line 290 "pidl/idl.yp"
2611 { "$_[1]$_[2]$_[3]" }
2613 [#Rule 87
2614 'anytext', 3,
2616 #line 291 "pidl/idl.yp"
2617 { "$_[1]$_[2]$_[3]" }
2619 [#Rule 88
2620 'anytext', 3,
2622 #line 292 "pidl/idl.yp"
2623 { "$_[1]$_[2]$_[3]" }
2625 [#Rule 89
2626 'anytext', 3,
2628 #line 293 "pidl/idl.yp"
2629 { "$_[1]$_[2]$_[3]" }
2631 [#Rule 90
2632 'anytext', 5,
2634 #line 294 "pidl/idl.yp"
2635 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2637 [#Rule 91
2638 'anytext', 5,
2640 #line 295 "pidl/idl.yp"
2641 { "$_[1]$_[2]$_[3]$_[4]$_[5]" }
2643 [#Rule 92
2644 'identifier', 1, undef
2646 [#Rule 93
2647 'optional_identifier', 1, undef
2649 [#Rule 94
2650 'optional_identifier', 0, undef
2652 [#Rule 95
2653 'constant', 1, undef
2655 [#Rule 96
2656 'text', 1,
2658 #line 309 "pidl/idl.yp"
2659 { "\"$_[1]\"" }
2661 [#Rule 97
2662 'optional_semicolon', 0, undef
2664 [#Rule 98
2665 'optional_semicolon', 1, undef
2668 @_);
2669 bless($self,$class);
2672 #line 320 "pidl/idl.yp"
2675 use Parse::Pidl::Util;
2677 #####################################################################
2678 # traverse a perl data structure removing any empty arrays or
2679 # hashes and any hash elements that map to undef
2680 sub CleanData($)
2682 sub CleanData($);
2683 my($v) = shift;
2684 if (ref($v) eq "ARRAY") {
2685 foreach my $i (0 .. $#{$v}) {
2686 CleanData($v->[$i]);
2687 if (ref($v->[$i]) eq "ARRAY" && $#{$v->[$i]}==-1) {
2688 $v->[$i] = undef;
2689 next;
2692 # this removes any undefined elements from the array
2693 @{$v} = grep { defined $_ } @{$v};
2694 } elsif (ref($v) eq "HASH") {
2695 foreach my $x (keys %{$v}) {
2696 CleanData($v->{$x});
2697 if (!defined $v->{$x}) { delete($v->{$x}); next; }
2698 if (ref($v->{$x}) eq "ARRAY" && $#{$v->{$x}}==-1) { delete($v->{$x}); next; }
2701 return $v;
2704 sub _Error {
2705 if (exists $_[0]->YYData->{ERRMSG}) {
2706 print $_[0]->YYData->{ERRMSG};
2707 delete $_[0]->YYData->{ERRMSG};
2708 return;
2710 my $line = $_[0]->YYData->{LINE};
2711 my $last_token = $_[0]->YYData->{LAST_TOKEN};
2712 my $file = $_[0]->YYData->{INPUT_FILENAME};
2714 print "$file:$line: Syntax error near '$last_token'\n";
2717 sub _Lexer($)
2719 my($parser)=shift;
2721 $parser->YYData->{INPUT} or return('',undef);
2723 again:
2724 $parser->YYData->{INPUT} =~ s/^[ \t]*//;
2726 for ($parser->YYData->{INPUT}) {
2727 if (/^\#/) {
2728 if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
2729 $parser->YYData->{LINE} = $1-1;
2730 $parser->YYData->{INPUT_FILENAME} = $2;
2731 goto again;
2733 if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
2734 $parser->YYData->{LINE} = $1-1;
2735 $parser->YYData->{INPUT_FILENAME} = $2;
2736 goto again;
2738 if (s/^(\#.*)$//m) {
2739 goto again;
2742 if (s/^(\n)//) {
2743 $parser->YYData->{LINE}++;
2744 goto again;
2746 if (s/^\"(.*?)\"//) {
2747 $parser->YYData->{LAST_TOKEN} = $1;
2748 return('TEXT',$1);
2750 if (s/^(\d+)(\W|$)/$2/) {
2751 $parser->YYData->{LAST_TOKEN} = $1;
2752 return('CONSTANT',$1);
2754 if (s/^([\w_]+)//) {
2755 $parser->YYData->{LAST_TOKEN} = $1;
2756 if ($1 =~
2757 /^(coclass|interface|const|typedef|declare|union
2758 |struct|enum|bitmap|void)$/x) {
2759 return $1;
2761 return('IDENTIFIER',$1);
2763 if (s/^(.)//s) {
2764 $parser->YYData->{LAST_TOKEN} = $1;
2765 return($1,$1);
2770 sub parse_idl($$)
2772 my ($self,$filename) = @_;
2774 my $saved_delim = $/;
2775 undef $/;
2776 my $cpp = $ENV{CPP};
2777 if (! defined $cpp) {
2778 $cpp = "cpp";
2780 my $data = `$cpp -D__PIDL__ -xc $filename`;
2781 $/ = $saved_delim;
2783 $self->YYData->{INPUT} = $data;
2784 $self->YYData->{LINE} = 0;
2785 $self->YYData->{LAST_TOKEN} = "NONE";
2787 my $idl = $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error );
2789 return CleanData($idl);