Still reproducible (2017.11, HEAD(5929887)). It does print Nil instead of (Any), but same thing. On 2015-03-08 09:22:25, b...@abrij.org wrote: > > In a grammar that uses a proto+parameterized multi, the "multi" is > optional according to S05. However, the presence of the "multi" > seems to prevent proper operation of this feature under certain > circumstances: > > # perl6 -e 'grammar f { proto token g {*}; token g:h<i> { i* }; token > g:h<j> { j* }; proto token l {*}; multi token l:m<n> { n* }; multi > token l:m<o> { o* } }; f.parse("i", :rule<g>).say; f.parse("j", > :rule<g>).say; f.parse("n", :rule<l>).say; f.parse("o", > :rule<l>).say;' > 「i」 > 「j」 > 「n」 > (Any) > > It seems to work fine in other circumstances. The same as above, but > without the quantifiers yields: > > # perl6 -e 'grammar f { proto token g {*}; token g:h<i> { i }; token > g:h<j> { j }; proto token l {*}; multi token l:m<n> { n }; multi token > l:m<o> { o } }; f.parse("i", :rule<g>).say; f.parse("j", > :rule<g>).say; f.parse("n", :rule<l>).say; f.parse("o", > :rule<l>).say;' > 「i」 > 「j」 > 「n」 > 「o」
[perl #124018] Differing behavior of multi grammar rules with and without "multi"
Aleks-Daniel Jakimenko-Aleksejev via RT Fri, 01 Dec 2017 12:03:55 -0800