I believe Ger Hobbelt discovered a problem.
The "cut point", in the sense of a point after which there is no use of
backtracking, is the property of a specific selection operator.
Once B in Ger's examples sucessfully consumed A, it indeed does not need
to backtrack (as this must fail).
But G in the second example has to backtrack after failing B, even if B
passed its cut point. So B has no right to erase the history because it
may be used by the containing expression.
So the cut points should somehow be considered in the entire hierarchy
of parsing expressions.
I recently wrote a note about cut points, to be presented at the CSP
workshop this year. It was inspired by a section in the paper by Maidl
et al. about producing error messages; apparently failures in 'no
return' areas defined by cut points are those relevant ones.
I missed there the fact that cut points are local.
(My note can be found at http://www.romanredz.se/papers/CSP2014.pdf.
Remember: it is preliminary and not peer-reviewed yet.)
Roman
_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg