# New Ticket Created by  "Brian S. Julin" 
# Please include the string:  [perl #124018]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=124018 >



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」

Reply via email to