# compile-time failure in require
do_require "1)\n";
-print "# $@\nnot " unless $@ =~ /syntax error/i;
+# bison says 'parser error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+print "# $@\nnot " unless $@ =~ /(syntax|parser) error/i;
print "ok ",$i++,"\n";
# successful require
$status = $?;
$results = `$CAT $tmpfile`;
$results =~ s/\n+$//;
- $results =~ s/syntax error/syntax error/i;
+# bison says 'parser error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+ $results =~ s/^(syntax|parser) error/\L$1 error/i;
$expected =~ s/\n+$//;
if ( $results ne $expected){
print STDERR "PROG: $switch\n$prog\n";
# allow expected output to be written as if $prog is on STDIN
$results =~ s/tmp\d+/-/g;
$results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg
- $results =~ s/Syntax/syntax/; # non-standard yacc
+# bison says 'parser error' instead of 'syntax error',
+# various yaccs may or may not capitalize 'syntax'.
+ $results =~ s/^(syntax|parser) error/\L$1 error/i;
$expected =~ s/\n+$//;
my $prefix = ($results =~ s/^PREFIX\n//) ;
if ( $results =~ s/^SKIPPED\n//) {