From: <buc...@us...> - 2008-12-31 12:59:30
|
Revision: 107 http://devmon.svn.sourceforge.net/devmon/?rev=107&view=rev Author: buchanmilne Date: 2008-12-31 12:59:26 +0000 (Wed, 31 Dec 2008) Log Message: ----------- Fix some log messages Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2008-12-31 12:58:08 UTC (rev 106) +++ trunk/modules/dm_templates.pm 2008-12-31 12:59:26 UTC (rev 107) @@ -551,7 +551,7 @@ $func_type eq 'speed' and do { $temp =~ s/\s*\{\s*\S+?\s*\}|\s*,\s*//g; - do_log("DATE transform uses only a single oid at " . + do_log("SPEED transform uses only a single oid at " . "$trans_file, line $l_num", 0) and next LINE if $temp ne ''; last CASE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dba...@us...> - 2009-09-23 01:40:40
|
Revision: 152 http://devmon.svn.sourceforge.net/devmon/?rev=152&view=rev Author: dbaldwin Date: 2009-09-23 01:39:50 +0000 (Wed, 23 Sep 2009) Log Message: ----------- cleanup SWITCH $val_pair parsing in dm_templates.pm Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2009-09-22 05:21:12 UTC (rev 151) +++ trunk/modules/dm_templates.pm 2009-09-23 01:39:50 UTC (rev 152) @@ -270,31 +270,33 @@ $trans_data->{'dep_oid'} = $dep_oid; for my $val_pair (split /\s*,\s*/, $switch_data) { - my ($if, $then) = ($1, $2) - if $val_pair =~ /^\s*(\S+.*?)\s*=\s*(.+?)\s*$/; - my $type = ''; - if($if =~ /^\d+$/) {$type = 'num'} - elsif($if =~ /^>\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'gt'; $if = $1} - elsif($if =~ /^>=\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'gte'; $if = $1} - elsif($if =~ /^<\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'lt'; $if = $1} - elsif($if =~ /^<=\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'lte'; $if = $1} - elsif - ($if =~ /^([+-]?\d+(?:\.\d+)?)\s*-\s*([+-]?\d+(?:\.\d+)?)$/) - {$type = 'rng'; $if = "$1-$2"} + if( $val_pair =~ /^\s*(\S+.*?)\s*=\s*(.+?)\s*$/) { + my ($if, $then) = ($1, $2); + my $type = ''; + if($if =~ /^\d+$/) {$type = 'num'} + elsif($if =~ /^>\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'gt'; $if = $1} + elsif($if =~ /^>=\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'gte'; $if = $1} + elsif($if =~ /^<\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'lt'; $if = $1} + elsif($if =~ /^<=\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'lte'; $if = $1} + elsif + ($if =~ /^([+-]?\d+(?:\.\d+)?)\s*-\s*([+-]?\d+(?:\.\d+)?)$/) + {$type = 'rng'; $if = "$1-$2"} - elsif($if =~ /^'(.+)'$/) {$type = 'str'; $if = $1} - elsif($if =~ /^"(.+)"$/) {$type = 'reg'; $if = $1} - elsif($if =~ /^default$/i) {$default = $then; next} + elsif($if =~ /^'(.+)'$/) {$type = 'str'; $if = $1} + elsif($if =~ /^"(.+)"$/) {$type = 'reg'; $if = $1} + elsif($if =~ /^default$/i) {$default = $then; next} + $cases->{++$case_num}{'if'} = $if; + $cases->{$case_num}{'type'} = $type; + $cases->{$case_num}{'then'} = $then; - do_log("Could not determine case type for string '$if'", 0) - and next PTL_OID if !defined $if; - $cases->{++$case_num}{'if'} = $if; - $cases->{$case_num}{'type'} = $type; - $cases->{$case_num}{'then'} = $then; + } else { + do_log("Could not parse $dep_oid : ".uc($trans_type)." option '$val_pair'"); + next PTL_OID; + } } # Sort our case numbers this once This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2009-12-28 10:41:22
|
Revision: 166 http://devmon.svn.sourceforge.net/devmon/?rev=166&view=rev Author: buchanmilne Date: 2009-12-28 10:41:07 +0000 (Mon, 28 Dec 2009) Log Message: ----------- Fix typo reported by Wim Nelis Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2009-12-16 10:17:11 UTC (rev 165) +++ trunk/modules/dm_templates.pm 2009-12-28 10:41:07 UTC (rev 166) @@ -578,7 +578,7 @@ my $type; if($if =~ /^\d+$/) {$type = 'num'} elsif($if =~ /^>\s*\d+(\.\d+)?$/) {$type = 'gt'} - elsif($if =~ /^>=\s*\d+(\.\d+?)$/) {$type = 'gte'} + elsif($if =~ /^>=\s*\d+(\.\d+)?$/) {$type = 'gte'} elsif($if =~ /^<\s*\d+(\.\d+)?$/) {$type = 'lt'} elsif($if =~ /^<=\s*\d+(\.\d+)?$/) {$type = 'lte'} elsif($if =~ /^\d+(\.\d+)?\s*-\s*\d+(\.\d+)?$/) {$type = 'rng'} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2011-01-24 15:01:35
|
Revision: 205 http://devmon.svn.sourceforge.net/devmon/?rev=205&view=rev Author: buchanmilne Date: 2011-01-24 15:01:29 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Move parsing of index operator to maintain alphabetical ordering of operators Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2011-01-24 14:55:49 UTC (rev 204) +++ trunk/modules/dm_templates.pm 2011-01-24 15:01:29 UTC (rev 205) @@ -534,6 +534,14 @@ last CASE; }; + $func_type eq 'index' and do { + $temp =~ s/\s*\{\s*\S+?\s*\}|\s*,\s*//g; + do_log("INDEX transform uses only a single oid at " . + "$trans_file, line $l_num", 0) + and next LINE if $temp ne ''; + last CASE; + }; + $func_type eq 'math' and do { $temp =~ s/:\s*\d+\s*$//; $temp =~ s/\{\s*\S+?\s*\}|\s|\s\.\s|x|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)\s*//g; @@ -653,14 +661,6 @@ last CASE; }; - $func_type eq 'index' and do { - $temp =~ s/\s*\{\s*\S+?\s*\}|\s*,\s*//g; - do_log("INDEX transform uses only a single oid at " . - "$trans_file, line $l_num", 0) - and next LINE if $temp ne ''; - last CASE; - }; - do_log("Unknown function '$func_type' at $trans_file, line $l_num", 0); next LINE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2011-01-24 15:12:09
|
Revision: 206 http://devmon.svn.sourceforge.net/devmon/?rev=206&view=rev Author: buchanmilne Date: 2011-01-24 15:12:03 +0000 (Mon, 24 Jan 2011) Log Message: ----------- Fix parsing of WORST operator (Wim Nelis) Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2011-01-24 15:01:29 UTC (rev 205) +++ trunk/modules/dm_templates.pm 2011-01-24 15:12:03 UTC (rev 206) @@ -654,7 +654,7 @@ }; $func_type eq 'worst' and do { - $temp =~ s/^\s*\{\s*\S+?\s*\}|\s*,\s*//g; + $temp =~ s/\s*\{\s*\S+?\s*\}|\s*,\s*//g; do_log("WORST transform uses only comma-delimited oids at " . "$trans_file, line $l_num", 0) and next LINE if $temp ne ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dba...@us...> - 2011-03-18 00:24:23
|
Revision: 219 http://devmon.svn.sourceforge.net/devmon/?rev=219&view=rev Author: dbaldwin Date: 2011-03-18 00:24:17 +0000 (Fri, 18 Mar 2011) Log Message: ----------- enforce whitespace surrounded x in MATH transforms file template checking Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2011-03-18 00:17:03 UTC (rev 218) +++ trunk/modules/dm_templates.pm 2011-03-18 00:24:17 UTC (rev 219) @@ -544,10 +544,10 @@ $func_type eq 'math' and do { $temp =~ s/:\s*\d+\s*$//; - $temp =~ s/\{\s*\S+?\s*\}|\s|\s\.\s|x|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)\s*//g; + $temp =~ s/\{\s*\S+?\s*\}|\s\.\s|\sx\s|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)\s*//g; do_log("MATH transform uses only math/numeric symbols and an " . "optional precision number at $trans_file, line $l_num", 0) - and next LINE if $temp ne ''; + and next LINE if $temp !~ /^\s*$/; last CASE; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <buc...@us...> - 2012-12-21 06:45:25
|
Revision: 237 http://devmon.svn.sourceforge.net/devmon/?rev=237&view=rev Author: buchanmilne Date: 2012-12-21 06:45:18 +0000 (Fri, 21 Dec 2012) Log Message: ----------- Fix regex for operator matching in MATH transform, which had broken some templates using x as multiplication Modified Paths: -------------- trunk/modules/dm_templates.pm Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2012-08-03 10:36:23 UTC (rev 236) +++ trunk/modules/dm_templates.pm 2012-12-21 06:45:18 UTC (rev 237) @@ -544,9 +544,10 @@ $func_type eq 'math' and do { $temp =~ s/:\s*\d+\s*$//; - $temp =~ s/\{\s*\S+?\s*\}|\s\.\s|\sx\s|\*|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)\s*//g; + $temp =~ s/\{\s*\S+?\s*\}|\s\.\s|\s+x\s+|\*|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)//g; + $temp =~ s/\s*//; do_log("MATH transform uses only math/numeric symbols and an " . - "optional precision number at $trans_file, line $l_num", 0) + "optional precision number, $temp did not pass, at $trans_file, line $l_num", 0) and next LINE if $temp !~ /^\s*$/; last CASE; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |