From: Graham B. <gb...@us...> - 2002-08-19 23:51:40
|
Update of /cvsroot/perl-ldap/asn In directory usw-pr-cvs1:/tmp/cvs-serv7018 Modified Files: parser.y Log Message: Fix for nested CHOICEs and tagged CHOICEs in SEQUENCES Index: parser.y =================================================================== RCS file: /cvsroot/perl-ldap/asn/parser.y,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- parser.y 25 Mar 2002 07:39:46 -0000 1.7 +++ parser.y 19 Aug 2002 23:51:37 -0000 1.8 @@ -354,7 +354,10 @@ compile_one($tree, $op->[cCHILD], defined($op->[cVAR]) ? $name . "." . $op->[cVAR] : $name); ;# If a CHOICE is given a tag, then it must be EXPLICIT - $op = explicit($op) if $op->[cTYPE] == opCHOICE && defined($op->[cTAG]) && length($op->[cTAG]); + if ($op->[cTYPE] == opCHOICE && defined($op->[cTAG]) && length($op->[cTAG])) { + $op = bless explicit($op); + $op->[cTYPE] = opSEQUENCE; + } if ( @{$op->[cCHILD]} > 1) { ;#if ($op->[cTYPE] != opSEQUENCE) { |