returns p's result unchanged; on failure it reports p's failure with the position reset to where
ParseTry
started.
▪
ParseTry
marks p as a backtracking point. In a committed-PEG parser an ordered choice whose alternative consumes input and then fails is committed to that consumption and the whole choice fails; wrapping the alternative in
ParseTry
restores the position so the next alternative is tried.
already restarts every alternative from the position where the choice began, so it recovers from partial consumption on its own. Wrapping an alternative in