summaryrefslogtreecommitdiff
path: root/lib/sbin/parameter_parser.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-12-17 17:34:46 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2000-12-17 17:34:46 +0000
commitd6f0d0d5e3811f9aafa2e4a8db67afc8f7901b26 (patch)
treebd3dcb4fca6a5fc9cee4ac30208b52638bbf6cb9 /lib/sbin/parameter_parser.pl
parent6740797e831b307d8853b1f954b17aa8b28adf98 (diff)
Remove necessity for description string when doing USES or EXTENDS.
Tom git-svn-id: http://svn.cactuscode.org/flesh/trunk@1969 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/parameter_parser.pl')
-rw-r--r--lib/sbin/parameter_parser.pl17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/sbin/parameter_parser.pl b/lib/sbin/parameter_parser.pl
index b3172a0a..9bb9e9b7 100644
--- a/lib/sbin/parameter_parser.pl
+++ b/lib/sbin/parameter_parser.pl
@@ -145,7 +145,7 @@ sub parse_param_ccl
$parameter_db{"\U$thorn $block\E variables"} = "";
}
}
- elsif($line =~ m:(EXTENDS |USES )?\s*(?\:CCTK_)?(INT|REAL|BOOLEAN|KEYWORD|STRING)\s*([a-zA-Z]+[a-zA-Z0-9_]*) \s*(\"[^\"]*\")\s*(.*)$:i)
+ elsif($line =~ m:(EXTENDS |USES )?\s*(?\:CCTK_)?(INT|REAL|BOOLEAN|KEYWORD|STRING)\s*([a-zA-Z]+[a-zA-Z0-9_]*)\s*(\"[^\"]*\")?\s*(.*)$:i)
{
# This is a parameter definition.
@@ -165,6 +165,19 @@ sub parse_param_ccl
$use_clause = 0;
}
+ if($description !~ m:\":)
+ {
+ if($use_or_extend)
+ {
+ $description = "";
+ }
+ else
+ {
+ $message = "Missing description for $variable in thorn $thorn.";
+ &CST_error(0,$message,__LINE__,__FILE__);
+ }
+ }
+
if($defined_parameters{"\U$variable\E"})
{
@@ -195,7 +208,7 @@ sub parse_param_ccl
# Move past {
if($data[$line_number+1] !~ m:\s*\{\s*:)
{
- if ($use_clause)
+ if ($use_clause)
{
$skip_range_block = 1;
}