Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (21 sloc) 315 Bytes
#!/usr/bin/perl
use strict;
use warnings;
open my $aFH, ">ebnf.a";
open my $bFH, ">ebnf.b";
my $FH = $bFH;
while(<>)
{
my $s = $_;
if (/^=for grammar/../^=cut/)
{
$FH = $aFH;
} else {
$FH = $bFH;
}
print($FH $s)
if $s =~ m/^#</;
}
close $aFH;
close $bFH;
exec("diff ebnf.a ebnf.b");
Something went wrong with that request. Please try again.