%alt% is the infix notation for the alt function.
p1 %alt% p2
the first parser
the second parser
Returns the first parser if it suceeds otherwise the second parser
(item() %alt% succeed("2")) ("abcdef")
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.