jneen/parsy — pull request #4 by bugaevc (2014-12-30 14:00:17+00:00)
Title: Implement additional operators

Operator `*` works just like it does for lists and strings - basically, `parsers * n` means `parser.times(n)`. It also supports ranges, so that `parser * range(a, b)` is equivalent to `parser.times(a, b-1)`.

Operator `+` performs addition of its operands' results, whatever addition means for their type. It is intended to be used with strings or lists (like, for example, `expr.map(lambda _: [_]) + (comma >> expr).many()`). One of the possible use-cases is a shorter `parser.at_least()` implementation (commit fddf7ee2f6b9deb4574347be21071829238981d0). I also took the chance to simplify `parser.many()` and `parser.times()` code by squashing three loops into one.