Howdy All, I am once again (no big surprise here) puzzled about some RecDescent
behaviour. Would anyone care to attempt to explain in small words why the
following snippet won't parse?
--------------------------
use Parse::RecDescent;
my $parse = Parse::RecDescent->new(join '', <DATA>) or die "Bad Grammar!";
my $text = "a\nb\nc\nd\n";
my $x = $parse->lines($text);
if ($x)
{
print "x=$x $text parsed successfully!\n";
}
else
{
print "$text is NOT parsable!!\n";
}
__DATA__
lines: /a|b|c|d/ EOL {print "line $item[0]\n"; 1}
EOL: /\n/ {1}
--------------------------
Thanks again for taking pity on the unenlightened! :-)
Ken
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.