Fix indentation; $ in the middle of regexps confuses Emacs, so use \Z

instead.  No functional changes.
This commit is contained in:
Markus Armbruster 2004-02-15 16:22:02 +00:00
parent eca121f709
commit cb5c45dcd2
2 changed files with 72 additions and 72 deletions

View file

@ -8,7 +8,7 @@ my @a;
line: while (<>) { line: while (<>) {
chomp; # strip record separator chomp; # strip record separator
s/([^\\](\\\\)*)\\\".*/$1/g;# strip comments s/([^\\](\\\\)*)\\\".*/$1/g; # strip comments
@a = req($_); @a = req($_);
@ -72,7 +72,7 @@ sub req {
if (/^([\.\'])[ \t]*([^ ]+) *(.*)/) { if (/^([\.\'])[ \t]*([^ ]+) *(.*)/) {
my @a = ($1, $2); my @a = ($1, $2);
$_ = $3; $_ = $3;
while (/(\"((\\.|[^\\\"])*)(\"|$))|(([^ ]|\\.)+) */g) { while (/(\"((\\.|[^\\\"])*)(\"|\Z))|(([^ ]|\\.)+) */g) {
push(@a, $2 || $5); push(@a, $2 || $5);
} }
return @a; return @a;

View file

@ -9,7 +9,7 @@ my @a;
line: while (<>) { line: while (<>) {
chomp; # strip record separator chomp; # strip record separator
s/([^\\](\\\\)*)\\\".*/$1/g;# strip comments s/([^\\](\\\\)*)\\\".*/$1/g; # strip comments
@a = req($_); @a = req($_);
@ -79,7 +79,7 @@ sub req {
if (/^([\.\'])[ \t]*([^ ]+) *(.*)/) { if (/^([\.\'])[ \t]*([^ ]+) *(.*)/) {
my @a = ($1, $2); my @a = ($1, $2);
$_ = $3; $_ = $3;
while (/(\"((\\.|[^\\\"])*)(\"|$))|(([^ ]|\\.)+) */g) { while (/(\"((\\.|[^\\\"])*)(\"|\Z))|(([^ ]|\\.)+) */g) {
push(@a, $2 || $5); push(@a, $2 || $5);
} }
return @a; return @a;