summaryrefslogtreecommitdiff
path: root/lib/sbin
diff options
context:
space:
mode:
authorallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-24 08:36:51 +0000
committerallen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-09-24 08:36:51 +0000
commit5306dfb8606662c404b404368b5bde80237e6a77 (patch)
tree78aa5134c482f94a0540d7effed180a52b251d9b /lib/sbin
parentbfccfc84ebba380963ddebd88e7bbe9c0c39c152 (diff)
Accept first 4 letters of any keywork
git-svn-id: http://svn.cactuscode.org/flesh/trunk@986 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin')
-rw-r--r--lib/sbin/NewCreateScheduleBindings.pl2
-rw-r--r--lib/sbin/ScheduleParser.pl30
2 files changed, 20 insertions, 12 deletions
diff --git a/lib/sbin/NewCreateScheduleBindings.pl b/lib/sbin/NewCreateScheduleBindings.pl
index 88c8fe4f..d7e0340a 100644
--- a/lib/sbin/NewCreateScheduleBindings.pl
+++ b/lib/sbin/NewCreateScheduleBindings.pl
@@ -433,7 +433,7 @@ sub ScheduleStatement
}
else
{
- print STDERR "Unknown statement type '" .$schedule_database{"\U$thorn\E STATEMENT_$statement TYPE"} ."'\n";
+ print STDERR "Unknown statement type ($thorn) '" .$schedule_database{"\U$thorn\E STATEMENT_$statement TYPE"} ."'\n";
$CST_errors++;
return ("", "");
}
diff --git a/lib/sbin/ScheduleParser.pl b/lib/sbin/ScheduleParser.pl
index f1db4aac..490175ba 100644
--- a/lib/sbin/ScheduleParser.pl
+++ b/lib/sbin/ScheduleParser.pl
@@ -107,7 +107,7 @@ sub parse_schedule_ccl
$buffer .= "\@BLOCK\@$n_blocks\n";
$n_blocks++;
}
- elsif($data[$line_number] =~ m/^\s*(STORAGE|COMM(UNICATION)):\s*/i)
+ elsif($data[$line_number] =~ m/^\s*(STOR|COMM)[^:]*:\s*/i)
{
($line_number, $type, $groups) = &ParseScheduleStatement($line_number, @data);
$schedule_db{"\U$thorn\E STATEMENT_$n_statements TYPE"} = $type;
@@ -345,19 +345,19 @@ sub ParseScheduleBlock
while($data[$line_number] !~ m:\s*\}\s*:)
{
$line_number++;
- if($data[$line_number] =~ m/^\s*STORAGE\s*:\s*(.*)$/i)
+ if($data[$line_number] =~ m/^\s*STOR[^:]*:\s*(.*)$/i)
{
push(@mem_groups, split(/\s,/, $1));
}
- elsif($data[$line_number] =~ m/^\s*COMM(UNICATION)?\s*:\s*(.*)$/i)
+ elsif($data[$line_number] =~ m/^\s*COMM[^:]*:(.*)$/i)
{
- push(@comm_groups, split(/\s,/, $2));
+ push(@comm_groups, split(/\s,/, $1));
}
- elsif($data[$line_number] =~ m/^\s*TRIGGER(S)?\s*:\s*(.*)$/i)
+ elsif($data[$line_number] =~ m/^\s*TRIG[^:]*\s*:\s*(.*)$/i)
{
- push(@trigger_groups, split(/\s,/, $2));
+ push(@trigger_groups, split(/\s,/, $1));
}
- elsif($data[$line_number] =~ m/^\s*LANG(UAGE)?\s*:\s*(.*)$/i)
+ elsif($data[$line_number] =~ m/^\s*LANG[^:]*:\s*(.*)$/i)
{
if($language ne "")
{
@@ -366,7 +366,7 @@ sub ParseScheduleBlock
}
else
{
- $language= $2;
+ $language= $1;
}
}
elsif($data[$line_number] =~ m:\s*\}\s*:)
@@ -426,10 +426,18 @@ sub ParseScheduleStatement
local($line_number, @data) = @_;
local($type, $groups);
- $data[$line_number] =~ m/^\s*(STORAGE|COMM(UNICATION)):\s*([\w\s\,]*)/i;
+ $data[$line_number] =~ m/^\s*(STOR|COMM)[^:]*:\s*([\w\s\,]*)/i;
+ if ($1 =~ /STOR/)
+ {
+ $statement_type = STORAGE;
+ }
+ elsif ($1 =~ /COMM/)
+ {
+ $statement_type = COMMUNICATION;
+ }
- $type = "\U$1\E";
- $groups = $3;
+ $type = "\U$statement_type\E";
+ $groups = $2;
return ($line_number, $type, $groups);
}