Changeset 10189
- Timestamp:
- Nov 24, 2006, 3:54:46 PM (20 years ago)
- Location:
- trunk/PS-IPP-Metadata-Config
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
config_grammar.txt (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/PS-IPP-Metadata-Config/Changes
r10187 r10189 6 6 - remove support for "epoch format" times 7 7 - additional metadata structure tests 8 - merge metadata_name & metadata_end into metdata 9 - merge empty metdata case into main metadata production 10 - error check vector 8 11 9 12 0.09 Thu Oct 26 16:16:28 HST 2006 -
trunk/PS-IPP-Metadata-Config/config_grammar.txt
r10148 r10189 1 1 # Copyright (c) 2005 Joshua Hoblitt 2 2 # 3 # $Id: config_grammar.txt,v 1.1 0 2006-11-22 23:57:10jhoblitt Exp $3 # $Id: config_grammar.txt,v 1.11 2006-11-25 01:53:26 jhoblitt Exp $ 4 4 5 5 { … … 19 19 { 20 20 $thisparser->{local} = pop @scope_stack; 21 [ grep $_->{class} !~ /comment_line/, @{$item [1]} ];21 [ grep $_->{class} !~ /comment_line/, @{$item{'statement(s)'}} ]; 22 22 } 23 23 … … 57 57 58 58 vector: 59 <skip:'[ \t\r]*'> vname vtype vvalue[ $item{vtype} ] comment(?) "\n"59 <skip:'[ \t\r]*'> vname <commit> vtype vvalue[ $item{vtype} ] comment(?) "\n" 60 60 { 61 61 $thisparser->{local}{name}{ $item{vname} }++ … … 73 73 if $item{'comment(?)'}[0]; 74 74 } 75 | <error?:redefinition of MULTI> <reject> 75 76 76 77 multi_declare: … … 89 90 # metadatas 90 91 metadata: 91 metadata_name92 { push @scope_stack, $thisparser->{local}; $thisparser->{local} = {} }93 grammar94 metadata_end95 {96 my $text = $item[2]; 97 98 if ( defined( $text )) {92 <skip:'[ \t\r]*'> name /METADATA/i comment(?) "\n" 93 <commit> 94 { push @scope_stack, $thisparser->{local}; $thisparser->{local} = {}; 1; } 95 grammar(?) 96 <skip:'[ \t\r]*'> /END/i comment(?) "\n" 97 98 { 99 if (defined(@{$item{'grammar(?)'}})) { 99 100 $return = { 100 101 class => 'metadata', 101 name => $item{ metadata_name},102 value => $item{grammar},102 name => $item{name}, 103 value => @{$item{'grammar(?)'}}, 103 104 }; 104 105 } else { 105 $return = undef; 106 } 107 108 if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) { 106 $return = { 107 class => 'metadata', 108 name => $item{name}, 109 value => [], 110 }; 111 } 112 113 $return->{comment} = $item[4][0] 114 if defined $item[4][0]; 115 116 if ( defined $thisparser->{local}{name}{ $item{name} } ) { 109 117 $return->{multi}++ 110 if $thisparser->{local}{name}{ $item{metadata_name} } =~ /MULTI/; 111 } else { 112 $thisparser->{local}{name}{ $item{metadata_name} }++; 113 } 114 } 115 | metadata_name <commit> comment_line(s?) metadata_end 116 { 117 $return = { 118 class => 'metadata', 119 name => $item{metadata_name}, 120 value => [], 121 }; 122 123 if ( defined $thisparser->{local}{name}{ $item{metadata_name} } ) { 124 $return->{multi}++ 125 if $thisparser->{local}{name}{ $item{metadata_name} } =~ /MULTI/; 126 } else { 127 $thisparser->{local}{name}{ $item{metadata_name} }++; 118 if $thisparser->{local}{name}{ $item{name} } =~ /MULTI/; 119 } else { 120 $thisparser->{local}{name}{ $item{name} }++; 128 121 } 129 122 } … … 208 201 } 209 202 } 210 211 metadata_name:212 <skip:'[ \t\r]*'> name /METADATA/i comment(?) "\n"213 { $item{name} }214 215 metadata_end:216 <skip:'[ \t\r]*'> /END/i comment(?) "\n"217 203 218 204 comment:
Note:
See TracChangeset
for help on using the changeset viewer.
