# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #111286] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=111286 >
<cognominal> nom: (grammar { token TOP { <a>? $<b>='b' }; token a { a } }).parse: 'ab'; say $/<b>.keys; <p6eval> nom 4130f6: OUTPUT«a» <cognominal> nom: (grammar { token TOP { <a> $<b>='b' }; token a { a } }).parse: 'ab'; say $/<b>.keys; <p6eval> nom 4130f6: OUTPUT«» <cognominal> jnthn, this does not make any sense to me that $/<b>.keys returns anything different than a void Parcel <cognominal> should I file a bug? <moritz> nom: (grammar { token TOP { <a> $<b>='b' }; token a { a } }).parse: 'ab'; say $/<b>.keys.WHAT; <p6eval> nom 4130f6: OUTPUT«List()» <moritz> cognominal: it's returns an empty List, not an empty Parcel. Is that your problem? <cognominal> see the first example, it prints "a\n". <cognominal> I don't care if it is a parcel or a list. Whatever it is should be empty. <moritz> agreed <cognominal> it does not happen when I delete the '?' suffix. <moritz> though of course the ? quantifier on <a> should not affect $<b> <cognominal> yes, that's my point. <moritz> agreed. Bug it is. <cognominal> it took me a while to golf it. Probably because my code hits other bugs as well. * masak submits rakudobug