public AtLeastOnceUntilParser(Parser <TToken, T> parser, Parser <TToken, U> terminator, bool keepResults) : base(ExpectedUtil.Concat(parser.Expected, terminator.Expected)) { _parser = parser; _terminator = terminator; _round2Expected = ExpectedUtil.Union(parser.Expected, terminator.Expected); _keepResults = keepResults; }
private protected override ImmutableSortedSet <Expected <TToken> > CalculateExpected() => ExpectedUtil.Union(_parsers.Select(p => p.Expected));
public OneOfParser(List <Parser <TToken, T> > parsers) : base(ExpectedUtil.Union(parsers.Select(p => p.Expected))) { _parsers = parsers; }
private OneOfParser(Parser <TToken, T>[] parsers) : base(ExpectedUtil.Union(parsers.Select(p => p.Expected))) { _parsers = parsers; }