View Source Chrysopoeia.Multi (chrysopoeia v0.1.1)

Combinators for repeatedly applying parsers

Link to this section Summary

Functions

Function that counts down to zero.

A combinator. Applies parser on the input as many times as it can.

A combinator. Applies parser on the input until until matches.

Link to this section Functions

Function that counts down to zero.

Link to this function

many(parser, opts \\ [count: 0])

View Source

A combinator. Applies parser on the input as many times as it can.

Must match at least opts[count] times (defaults to zero).

Link to this function

many_until(parser, until)

View Source

A combinator. Applies parser on the input until until matches.

Unlike Multi.many, if parser fails before until is found, the parser errors out.