IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3483


Ignore:
Timestamp:
Mar 23, 2005, 9:25:53 AM (21 years ago)
Author:
jhoblitt
Message:

change scalar & vector values to match only the proper type
fix bool
new MULTI syntax

File:
1 edited

Legend:

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

    r3480 r3483  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: Config.pm,v 1.9 2005-03-23 02:00:16 jhoblitt Exp $
     3# $Id: Config.pm,v 1.10 2005-03-23 19:25:53 jhoblitt Exp $
    44
    55package PS::IPP::Metadata::Config;
     
    8585
    8686scalar:
    87     <skip:'[ \t\r]*'> name type value comment(?) "\n"
     87    <skip:'[ \t\r]*'> name type <matchrule:$item{type}> comment(?) "\n"
    8888        {
    8989            $return = {
     
    9191                name    => $item{name},
    9292                type    => $item{type},
    93                 value   => $item{value},
     93                value   => $item[4],
    9494            };
    9595
     
    9999
    100100vector:
    101      <skip:'[ \t\r]*'> vname vtype vvalue comment(?) "\n"
     101     <skip:'[ \t\r]*'> vname vtype vvalue[ $item{vtype} ] comment(?) "\n"
    102102        {
    103103            $return = {
     
    114114
    115115multi_declare:
    116     <skip:'[ \t\r]*'> name '*' to_end_of_line "\n"
     116    <skip:'[ \t\r]*'> name /MULTI/i comment(?) "\n"
    117117        {{
    118118            class   => 'blank_line',
     
    259259
    260260type:
    261     vtype | 'STR' | 'STRING'
     261    vtype
     262    | 'STR'
     263    | 'STRING'
    262264
    263265vtype:
     
    282284    | 'TT'
    283285
    284 value:
    285     primitive | string
    286 
     286S8: int
     287S16: int
     288S32: int
     289S64: int
     290U8 : int
     291U16: int
     292U32: int
     293U64: int
     294F32: float
     295F64: float
     296C32: float
     297C64: float
     298BOOL: bool
     299STR: string
     300STRING: string
    287301
    288302vvalue:
    289     _vvalue(s)
     303    _vvalue[%arg](s)
    290304        { [ map { @$_ } @{$item[1]} ] }
    291305
     
    296310# backtracking optimization
    297311_vvalue:
    298     primitive vector_sep(?)
     312    <matchrule:$arg[0]> vector_sep(?)
    299313        { [ $item[1] ] }
    300314
    301315vector_sep:
    302316    /,|\s+/
    303 
    304 primitive:
    305     bool | float | int
    306317
    307318int:
     
    314325
    315326bool:
    316     /[tf]\s+?/i
     327    /[tf]/i
    317328        { $item[1] =~ /t/i ? 1 : 0 }
    318329
Note: See TracChangeset for help on using the changeset viewer.