<TimToady> masak: no, it makes the grammar behave wrong, it turns out
<TimToady> in parsing B\n, it matches the right side of x under LTM, and eats 
the newline that TOP needs to progress, so the next match fails to progress 
because $$ doesn't match
<TimToady> put a {} before the second \s* and it matches, because then it ties 
under LTM and works left-to-right instead
<TimToady> or change the 2nd \s* to a \h* and it works
<TimToady> so this turns out to be a bug in the tracer, I think
<TimToady> unless TOP should be backtracking to the left side of x, hmm
<TimToady> maybe it's a not-backtracking-into-subrule bug as well
<TimToady> I guess the token declarator for x is committing the match of the 
LTM in the alternation
<TimToady> if you change it to 'regex', it parses
<TimToady> so arguably that's correct behavior in rejecting the parse under 
'token'
<TimToady> anything that subverts LTM would tend to make it do || semantics, so 
I'm guessing the tracer is subverting LTM somehow; does it work by inserting {} 
nodes?
<TimToady> if so, we need to teach LTM to ignore those nodes
<TimToady> or insert 'em as <!{stuff; 0}> instead, which LTM already ignores
* TimToady delegates the problem to anyone who will delegate it to someone else 
who is not TimToady :)
<TimToady> masak: another way to fix your proggie is to change your [';' | $$] 
to match [';' | $$ | ^^] instead
<TimToady> but anyway, the bug report is at least partly right...   .oO("It is 
a comfort not to be mistaken on all points." --Gandalf)
<masak> TimToady: I added your comments to 
https://rt.perl.org/Ticket/Display.html?id=123452

Reply via email to