<masak> I need to digest those comments, though. I don't understand where the grammar "eats the newline that TOP needs to progress". <masak> and, oh yes, I also noticed that changing 'token x' to 'regex x' made the bug go away. that's one thing I failed to include. <masak> ...but anyway. even not following all the details, I know it's wrong that Grammar::Tracer heisenbugs the parse. :) <masak> if it turns out the problem is *all* in Grammar::Tracer, I'll happily re-file this as a Github issue. <TimToady> masak: the x rule matches a token of "B\n" and commits to that, but it must match only 'B' to allow the newline to match in TOP <TimToady> it commits to "B\n" because that's the longesst token <masak> why would the x rule ever match a "\n" after the "B"? <TimToady> and it matches that because everything at the end is optional, including the () <TimToady> \s* <TimToady> that's why changing \s* to \h* makes it work <masak> oh, it goes into the *right* alternation... <masak> I see. <TimToady> or changing '()'* to '()'+ <masak> right. <TimToady> or putting {} before the \s* <masak> the ungolfed grammar is 108 lines. but you just provided some clues for how to fix it. thanks. :) <moritz> whitespace. Still not a solved problem. <jnthn> masak: I highly suspect Grammar::Tracer is doing something wrong. Note that when it was written, LTM was...rathre less advanced...than it is now. <masak> yes, I think it's been established now that the problem is purely in Grammar::Tracer. <jnthn> OK <jnthn> Then feel free to file a tikkit. * masak does
Rejecting this ticket, as the problem seems to be entirely in Grammar::Tracer, not in Rakudo. See https://github.com/jnthn/grammar-debugger/issues/13 for the ticket opened in Grammar::Tracer.