IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2005, 11:48:53 AM (21 years ago)
Author:
jhoblitt
Message:

change typedef to match 'word(s)' as element values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm

    r3839 r3840  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.14 2005-05-04 21:46:13 jhoblitt Exp $
     3# $Id: Config.pm,v 1.15 2005-05-04 21:48:53 jhoblitt Exp $
    44
    55package PS::IPP::Metadata::Config;
     
    256256
    257257typedef:
    258     <skip:'[ \t\r]*'> name typedef_type <commit> name(s) comment(?) "\n"
     258    <skip:'[ \t\r]*'> name typedef_type <commit> word(s) comment(?) "\n"
    259259        {
    260260            my $type = $thisparser->{local}{typedef}{ $item{typedef_type} };
    261261
    262             unless ( scalar @{ $item{'name(s)'} } == $type->{length} ) {
     262            unless ( scalar @{ $item{'word(s)'} } == $type->{length} ) {
     263                my $expect = $type->{length};
     264                my $got = scalar @{ $item{'word(s)'} };
    263265                carp "\"$item{name} $item{typedef_type}\""
    264                     . " does not have enough fields";
     266                    . " does not have enough fields, epected: $expect, got: $got";
    265267                $return = undef;
    266268            } else {
     
    272274                        class   => 'scalar',
    273275                        type    => 'STR',
    274                         value   => $item{'name(s)'}[$i],
     276                        value   => $item{'word(s)'}[$i],
    275277                    };
    276278
     
    397399    /(?:\S[^#\n]*)?[^#\n ]/
    398400
     401word:
     402    /(?:[^#\s\n]+)/
     403
    399404to_end_of_line:
    400405    /[^\n]*/
Note: See TracChangeset for help on using the changeset viewer.