pub fn many<O, U>(p: Parser<O>) -> Parser<U> where
O: 'static,
U: 'static + FromIterator<O>,
Expand description
Applies the parser one or more times.
use memoir::*;
let p = many::<_, String>(symbol('!'));
assert_eq!(p.to_string(), "'!'+");
assert!(p.parse("!").is_ok());
assert!(p.parse("!!").is_ok());
assert!(p.parse("!!!").is_ok());
assert!(p.parse("").is_err());