IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 11, 2006, 4:08:51 PM (20 years ago)
Author:
jhoblitt
Message:

add support for empty METADATAs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/config_grammar.txt

    r9479 r9495  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: config_grammar.txt,v 1.5 2006-10-11 03:08:36 jhoblitt Exp $
     3# $Id: config_grammar.txt,v 1.6 2006-10-12 02:08:51 jhoblitt Exp $
    44
    55{
     
    8787
    8888metadata:
    89     metadata_name <commit>
     89    metadata_name
    9090    { push @scope_stack, $thisparser->{local}; $thisparser->{local} = {} }
    9191    grammar
     
    103103                $return = undef;
    104104            }
     105
     106            if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) {
     107                $return->{multi}++
     108                    if $thisparser->{local}{name}{ $item{metadata_name} } =~ /MULTI/;
     109            } else {
     110                $thisparser->{local}{name}{ $item{metadata_name} }++;
     111            }
     112        }
     113    | metadata_name <commit> comment_line(s?) metadata_end
     114        {
     115            $return = {
     116                class   => 'metadata',
     117                name    => $item{metadata_name},
     118                value   => [],
     119            };
    105120
    106121            if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) {
Note: See TracChangeset for help on using the changeset viewer.