New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Str ~~ Grammar do not return Match object, but return strange hash #404
Comments
From @ilyabelikingrammar G { my $a = ":123" ~~ G::TOP; say $/.WHAT; # Match # Hash, hmmm. I expect Match object. say $/.perl; # {"foo" => [{}, {}, {}]} # Strange hash say $/<foo>.WHAT; # List |
From @chrisdolanI'm seeing this too. It happened in the last 3-5 days, I think, about |
The RT System itself - Status changed from 'new' to 'open' |
From @pmichaudOn Mon, Nov 10, 2008 at 03:21:47AM -0800, Ilya Belikin wrote:
The official syntax for matching against a rule or grammar In the meantime, I suggest: my $a = G::TOP(":123"); Pm |
@pmichaud - Status changed from 'open' to 'stalled' |
From @chrisdolanI think I'm getting closer to the root cause of this regression -- the ./perl6 -e 'grammar Foo {token TOP {'foo'};}; say Foo::TOP("foo").WHAT' ./perl6 -e 'grammar Foo {token TOP {'foo'};}; my $m=Foo::TOP("foo"); even more revealing: ./perl6 -e 'say PGE::Match.new("foo").WHAT' ./perl6 -e 'my $m = PGE::Match.new("foo"); say $m.WHAT' Any guesses whether this is a bug in assignment or in PGE::Match? I'm |
The RT System itself - Status changed from 'stalled' to 'open' |
From @chrisdolanMore news: using 'infix::=' works around the regression. ./perl6 -e 'my $m := PGE::Match.new("foo"); say $m.WHAT' ./perl6 -e 'my $m = PGE::Match.new("foo"); say $m.WHAT' I now suspect the flaw is in assign.pir. I stuck a ton of debugging $I0 = can source, 'Scalar' The $m is an ObjectRef and it does has a 'Scalar' method. After the If I comment out the "source = source.'Scalar'()" line, then the code works ./perl6 -e 'my $m = PGE::Match.new("foo"); say $m.WHAT' |
From @pmichaudThis issue should now be fixed in r32597 so that PGE::Match objects Also, in order to help diagnose such issues in the future, I've added a $ ./parrot perl6.pbc Here we can see that even though .WHAT returns the expected Perl 6 I expect that most of the remaining discrepancies will resolve Resolving ticket, thanks! Pm |
@pmichaud - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#60456 (status was 'resolved')
Searchable as RT60456$
The text was updated successfully, but these errors were encountered: