IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 8888


Ignore:
Timestamp:
Sep 22, 2006, 2:26:50 PM (20 years ago)
Author:
jhoblitt
Message:

add float nan/inf support

Location:
trunk/PS-IPP-Metadata-Config
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PS-IPP-Metadata-Config/Changes

    r8583 r8888  
    11Revision history for Perl module PS::IPP::Metadata::Config
     2
     30.03
     4    - add float nan/inf support
    25
    360.02 Thu Aug 24 17:08:14 HST 2006
  • trunk/PS-IPP-Metadata-Config/MANIFEST

    r8583 r8888  
    1919t/05_time.t
    2020t/06_multi.t
     21t/07_float.t
  • trunk/PS-IPP-Metadata-Config/config_grammar.txt

    r8583 r8888  
    11# Copyright (c) 2005  Joshua Hoblitt
    22#
    3 # $Id: config_grammar.txt,v 1.1 2006-08-25 03:08:56 jhoblitt Exp $
     3# $Id: config_grammar.txt,v 1.2 2006-09-23 00:26:50 jhoblitt Exp $
    44
    55{
     
    289289    /(?:(?:[+-]?)(?:[0-9]+))/
    290290
     291    # based on $RE{num}{real} from Regexp::Common::number
    291292float:
    292     # based on $RE{num}{real} from Regexp::Common::number
    293293    /(?:(?i)(?:[+-]?)(?:(?=[0-9]|[.])(?:[0-9]*)(?:(?:[.])(?:[0-9]{0,}))?)(?:(?:[Ee])(?:(?:[+-]?)(?:[0-9]+))|))/
     294    | inf
     295    | nan
     296
     297inf:
     298    /[+-]?inf(?:inity)?/i
     299        {
     300            if ($item[1] =~ /^-/) {
     301                $return = "-inf";
     302            } else {
     303                $return = "+inf";
     304            }
     305        }
     306nan:
     307    /[+-]?nan(?:\(\S*?\))?/i
     308        { $return = "nan" }
    294309
    295310bool:
Note: See TracChangeset for help on using the changeset viewer.