Changeset 3483
- Timestamp:
- Mar 23, 2005, 9:25:53 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Metadata-Config/lib/PS/IPP/Metadata/Config.pm
r3480 r3483 1 1 # Copyright (c) 2005 Joshua Hoblitt 2 2 # 3 # $Id: Config.pm,v 1. 9 2005-03-23 02:00:16jhoblitt Exp $3 # $Id: Config.pm,v 1.10 2005-03-23 19:25:53 jhoblitt Exp $ 4 4 5 5 package PS::IPP::Metadata::Config; … … 85 85 86 86 scalar: 87 <skip:'[ \t\r]*'> name type valuecomment(?) "\n"87 <skip:'[ \t\r]*'> name type <matchrule:$item{type}> comment(?) "\n" 88 88 { 89 89 $return = { … … 91 91 name => $item{name}, 92 92 type => $item{type}, 93 value => $item {value},93 value => $item[4], 94 94 }; 95 95 … … 99 99 100 100 vector: 101 <skip:'[ \t\r]*'> vname vtype vvalue comment(?) "\n"101 <skip:'[ \t\r]*'> vname vtype vvalue[ $item{vtype} ] comment(?) "\n" 102 102 { 103 103 $return = { … … 114 114 115 115 multi_declare: 116 <skip:'[ \t\r]*'> name '*' to_end_of_line"\n"116 <skip:'[ \t\r]*'> name /MULTI/i comment(?) "\n" 117 117 {{ 118 118 class => 'blank_line', … … 259 259 260 260 type: 261 vtype | 'STR' | 'STRING' 261 vtype 262 | 'STR' 263 | 'STRING' 262 264 263 265 vtype: … … 282 284 | 'TT' 283 285 284 value: 285 primitive | string 286 286 S8: int 287 S16: int 288 S32: int 289 S64: int 290 U8 : int 291 U16: int 292 U32: int 293 U64: int 294 F32: float 295 F64: float 296 C32: float 297 C64: float 298 BOOL: bool 299 STR: string 300 STRING: string 287 301 288 302 vvalue: 289 _vvalue (s)303 _vvalue[%arg](s) 290 304 { [ map { @$_ } @{$item[1]} ] } 291 305 … … 296 310 # backtracking optimization 297 311 _vvalue: 298 primitivevector_sep(?)312 <matchrule:$arg[0]> vector_sep(?) 299 313 { [ $item[1] ] } 300 314 301 315 vector_sep: 302 316 /,|\s+/ 303 304 primitive:305 bool | float | int306 317 307 318 int: … … 314 325 315 326 bool: 316 /[tf] \s+?/i327 /[tf]/i 317 328 { $item[1] =~ /t/i ? 1 : 0 } 318 329
Note:
See TracChangeset
for help on using the changeset viewer.
