Subject: | <nocontext:> has no effect in rules with subpatterns |
Date: | Wed, 3 Jul 2019 07:16:23 +0300 |
To: | bug-Regexp-Grammars [...] rt.cpan.org |
From: | Alexander Karelas <alex.karelas [...] gmail.com> |
E.g.:
my $parser = qr/
<name>
<token: name>
<nocontext:>
<word= (\w+)>
/x;
"alex" =~ $parser;
use Data::Dumper;
print Dumper(\%/);
gives:
$VAR1 = {
'' => 'alex',
'name' => {
'word' => 'alex',
'' => 'alex'
}
};
...which contains some context in name (where I think it should not)