Open p6rt opened 14 years ago
22:39 \< moritz_> rakudo: grammar A { token TOP { \
No change in the past year.
-- Will "Coke" Coleda
@coke - Status changed from 'new' to 'open'
The problem is that the $*ACTIONS contextual is set to a type object (used to be Any, now Mu), so $*ACTIONS.any existed, but caused an error.
commit 0973612366de17d6eab26e975663e63170e5d1d5 eased some of the pain by switching it from Any to Mu, but the underlying problem is still there.
On Thu Oct 18 02:13:15 2012, moritz wrote:
The problem is that the $*ACTIONS contextual is set to a type object (used to be Any, now Mu), so $*ACTIONS.any existed, but caused an error.
commit 0973612366de17d6eab26e975663e63170e5d1d5 eased some of the pain by switching it from Any to Mu, but the underlying problem is still there.
00:11 \
Closeable with tests
On 04/14/2014 06:11 AM, Alexander Moquin via RT wrote:
On Thu Oct 18 02:13:15 2012, moritz wrote:
The problem is that the $*ACTIONS contextual is set to a type object (used to be Any, now Mu), so $*ACTIONS.any existed, but caused an error.
commit 0973612366de17d6eab26e975663e63170e5d1d5 eased some of the pain by switching it from Any to Mu, but the underlying problem is still there.
00:11 \
r: grammar A { token TOP { \ }; token any { 'foo' | 'bar' } }; say A.parse('foo') 00:11 \ rakudo-parrot 79167a, rakudo-jvm 79167a, rakudo-moar 79167a: OUTPUT«「foo」 any => 「foo」» Closeable with tests
The problem can still be reproduced with method names from class Mu, for example 'so':
\
I added a test in S05-grammar/inheritance.t but I'm unsure if this is a valid bug. If the default actions dispatch off the Mu type object then this is expected behavior. Maybe they can be sidestepped as a special case for grammar actions? Or at least a better error message could be spit out.
The correct solution would be to track the presence or absence of an action class by an out-of-bounds mechanism, like a separate variable.
I just don't know how to do that without making parsing significantly slower.
Migrated from rt.perl.org#77350 (status was 'open')
Searchable as RT77350$