summaryrefslogtreecommitdiff
path: root/lib/sbin/parameter_parser.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-04-04 09:34:02 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-04-04 09:34:02 +0000
commitff078f26a5f5f8691541f2e1d25502c4455f6fd7 (patch)
tree7953983cf215250afa38bc672f41dced21e3cc26 /lib/sbin/parameter_parser.pl
parentfb765bdf990fc1458276fe2b14667e009183d652 (diff)
Now if the :: delimiting a description of the range is missing, the range
doesn't end up blank. Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1510 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/parameter_parser.pl')
-rw-r--r--lib/sbin/parameter_parser.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl
index 0f8db579..01ff6b2d 100644
--- a/lib/sbin/parameter_parser.pl
+++ b/lib/sbin/parameter_parser.pl
@@ -220,7 +220,15 @@ sub parse_param_ccl
# The (optional) description is seperated by ::
while($data[$line_number] !~ m:\s*\}:)
{
- ($new_ranges, $delim, $new_desc) = $data[$line_number] =~ m/(.*)(::)(.*)/;
+ if($data[$line_number] =~ m/::/)
+ {
+ ($new_ranges, $delim, $new_desc) = $data[$line_number] =~ m/(.*)(::)(.*)/;
+ }
+ else
+ {
+ ($new_ranges, $delim, $new_desc) = ($data[$line_number],"","");
+ }
+
# Increment the number of ranges found (ranges)
$parameter_db{"\U$thorn $variable\E ranges"}++;
# Strip out any spaces in the range for a numeric parameter.
@@ -230,7 +238,7 @@ sub parse_param_ccl
}
$parameter_db{"\U$thorn $variable\E range $parameter_db{\"\U$thorn $variable\E ranges\"} range"} = $new_ranges;
# Give a warning if no description has been given
- if(! $delim)
+ if($delim eq "")
{
$message = "Missing description of range '$new_ranges' for parameter $thorn\::$variable";
&CST_error(1,$message,__LINE__,__FILE__);