Module combinator

Module combinator 

Source
Expand description

A unique feature of unsynn is that one can define a parser as a composition of other parsers on the fly without the need to define custom structures. This is done by using the Cons and Either types. The Cons type is used to define a parser that is a conjunction of two to four other parsers, while the Either type is used to define a parser that is a disjunction of two to four other parsers.

Structs§

Cons
Conjunctive A followed by B and optional C and D When C and D are not used, they are set to Nothing.

Enums§

Either
Disjunctive A or B or optional C or D tried in that order. When C and D are not used, they are set to Invalid.