Regexp-Grammars
view release on metacpan or search on metacpan
<!!!>
<token: Literal>
<error:>
|
<MATCH=( [+-]? \d++ (?: \. \d++ )?+ )>
}xms
};
local $/ = "";
while (my $input = <DATA>) {
chomp $input;
my ($text, $expected) = split /\s+/, $input, 2;
if ($text =~ $calculator) {
is $/{Answer}, $expected => "Input $.: $text";
}
else {
is_deeply \@!, eval($expected), => "Input $.: $text";
}
}
t/error_non_backtracking.t view on Meta::CPAN
<!!!>
<token: Literal>
<error:>
|
<MATCH=( [+-]? \d++ (?: \. \d++ )?+ )>
}xms
};
local $/ = "";
while (my $input = <DATA>) {
chomp $input;
my ($text, $expected) = split /\s+/, $input, 2;
if ($text =~ $calculator) {
is $/{Answer}, $expected => "Input $.: $text";
}
else {
is_deeply \@!, eval($expected), => "Input $.: $text";
}
}
t/error_translate.t view on Meta::CPAN
<...>
<token: Literal>
<error:>
|
<MATCH=( [+-]? \d++ (?: \. \d++ )?+ )>
}xms
};
local $/ = "";
{
my $temp = Regexp::Grammars::set_error_translator(\&translator);
while (my $input = <DATA>) {
chomp $input;
my ($text, $expected) = split /\s+/, $input, 2;
if ($text =~ $calculator) {
is $/{Answer}, $expected => "Input $.: $text";
}
else {
is_deeply \@!, eval($expected), => "Input $.: $text";
( run in 0.313 second using v1.01-cache-2.11-cpan-49f99fa48dc )