(_ parser: P) -> P {
parser
@@ -100,4 +99,404 @@ public enum ParserBuilder {
public static func buildLimitedAvailability(_ parser: P?) -> Parsers.OptionalVoid
{
.init(wrapped: parser)
}
+
+ @inlinable
+ public static func buildPartialBlock(first: P) -> P {
+ first
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(accumulated: P0, next: P1) -> SkipFirst {
+ .init(accumulated, next)
+ }
+
+ @inlinable
+ public static func buildPartialBlock(accumulated: P0, next: P1) -> SkipSecond {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(accumulated: P0, next: P1) -> Take2 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take3 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take4 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take5 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take6 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take7 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take8 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take9 {
+ .init(accumulated, next)
+ }
+
+ @_disfavoredOverload
+ @inlinable
+ public static func buildPartialBlock(
+ accumulated: P0, next: P1
+ ) -> Take10 {
+ .init(accumulated, next)
+ }
+
+ public struct SkipFirst: Parser
+ where P0.Input == P1.Input, P0.Output == Void {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
+ do {
+ try self.p0.parse(&input)
+ return try self.p1.parse(&input)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct SkipSecond: Parser
+ where P0.Input == P1.Input, P1.Output == Void {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
+ do {
+ let o0 = try self.p0.parse(&input)
+ try self.p1.parse(&input)
+ return o0
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take2: Parser
+ where
+ P0.Input == P1.Input
+ {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (P0.Output, P1.Output) {
+ do {
+ return try (
+ self.p0.parse(&input),
+ self.p1.parse(&input)
+ )
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take3: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (O0, O1, P1.Output) {
+ do {
+ let (o0, o1) = try self.p0.parse(&input)
+ return try (o0, o1, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take4: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (O0, O1, O2, P1.Output) {
+ do {
+ let (o0, o1, o2) = try self.p0.parse(&input)
+ return try (o0, o1, o2, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take5: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (O0, O1, O2, O3, P1.Output) {
+ do {
+ let (o0, o1, o2, o3) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take6: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3, O4) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ O0, O1, O2, O3, O4, P1.Output
+ ) {
+ do {
+ let (o0, o1, o2, o3, o4) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, o4, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take7: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3, O4, O5) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ O0, O1, O2, O3, O4, O5, P1.Output
+ ) {
+ do {
+ let (o0, o1, o2, o3, o4, o5) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, o4, o5, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take8: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3, O4, O5, O6) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ O0, O1, O2, O3, O4, O5, O6, P1.Output
+ ) {
+ do {
+ let (o0, o1, o2, o3, o4, o5, o6) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, o4, o5, o6, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take9: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3, O4, O5, O6, O7) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ O0, O1, O2, O3, O4, O5, O6, O7, P1.Output
+ ) {
+ do {
+ let (o0, o1, o2, o3, o4, o5, o6, o7) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, o4, o5, o6, o7, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+
+ public struct Take10: Parser
+ where P0.Input == P1.Input, P0.Output == (O0, O1, O2, O3, O4, O5, O6, O7, O8) {
+ @usableFromInline let p0: P0, p1: P1
+
+ @usableFromInline init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ O0, O1, O2, O3, O4, O5, O6, O7, O8, P1.Output
+ ) {
+ do {
+ let (o0, o1, o2, o3, o4, o5, o6, o7, o8) = try self.p0.parse(&input)
+ return try (o0, o1, o2, o3, o4, o5, o6, o7, o8, self.p1.parse(&input))
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+}
+
+extension ParserBuilder.SkipFirst: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: P1.Output, into input: inout P0.Input) rethrows {
+ try self.p1.print(output, into: &input)
+ try self.p0.print(into: &input)
+ }
+}
+
+extension ParserBuilder.SkipSecond: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: P0.Output, into input: inout P0.Input) rethrows {
+ try self.p1.print(into: &input)
+ try self.p0.print(output, into: &input)
+ }
+}
+
+extension ParserBuilder.Take2: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: (P0.Output, P1.Output), into input: inout P0.Input) rethrows {
+ try self.p1.print(output.1, into: &input)
+ try self.p0.print(output.0, into: &input)
+ }
+}
+
+extension ParserBuilder.Take3: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: (O0, O1, P1.Output), into input: inout P0.Input) rethrows {
+ try self.p1.print(output.2, into: &input)
+ try self.p0.print((output.0, output.1), into: &input)
+ }
+}
+
+extension ParserBuilder.Take4: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: (O0, O1, O2, P1.Output), into input: inout P0.Input) rethrows {
+ try self.p1.print(output.3, into: &input)
+ try self.p0.print((output.0, output.1, output.2), into: &input)
+ }
+}
+
+extension ParserBuilder.Take5: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(_ output: (O0, O1, O2, O3, P1.Output), into input: inout P0.Input) rethrows {
+ try self.p1.print(output.4, into: &input)
+ try self.p0.print((output.0, output.1, output.2, output.3), into: &input)
+ }
+}
+
+extension ParserBuilder.Take6: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(
+ _ output: (O0, O1, O2, O3, O4, P1.Output),
+ into input: inout P0.Input
+ ) rethrows {
+ try self.p1.print(output.5, into: &input)
+ try self.p0.print((output.0, output.1, output.2, output.3, output.4), into: &input)
+ }
+}
+
+extension ParserBuilder.Take7: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(
+ _ output: (O0, O1, O2, O3, O4, O5, P1.Output),
+ into input: inout P0.Input
+ ) rethrows {
+ try self.p1.print(output.6, into: &input)
+ try self.p0.print((output.0, output.1, output.2, output.3, output.4, output.5), into: &input)
+ }
+}
+
+extension ParserBuilder.Take8: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(
+ _ output: (O0, O1, O2, O3, O4, O5, O6, P1.Output),
+ into input: inout P0.Input
+ ) rethrows {
+ try self.p1.print(output.7, into: &input)
+ try self.p0.print(
+ (output.0, output.1, output.2, output.3, output.4, output.5, output.6),
+ into: &input
+ )
+ }
+}
+
+extension ParserBuilder.Take9: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(
+ _ output: (O0, O1, O2, O3, O4, O5, O6, O7, P1.Output),
+ into input: inout P0.Input
+ ) rethrows {
+ try self.p1.print(output.8, into: &input)
+ try self.p0.print(
+ (output.0, output.1, output.2, output.3, output.4, output.5, output.6, output.7),
+ into: &input
+ )
+ }
+}
+
+extension ParserBuilder.Take10: ParserPrinter where P0: ParserPrinter, P1: ParserPrinter {
+ @inlinable
+ public func print(
+ _ output: (O0, O1, O2, O3, O4, O5, O6, O7, O8, P1.Output),
+ into input: inout P0.Input
+ ) rethrows {
+ try self.p1.print(output.9, into: &input)
+ try self.p0.print(
+ (output.0, output.1, output.2, output.3, output.4, output.5, output.6, output.7, output.8),
+ into: &input
+ )
+ }
}
diff --git a/Sources/Parsing/Builders/Variadics.swift b/Sources/Parsing/Builders/Variadics.swift
index 4f5cb7d576..b3e883b4fe 100644
--- a/Sources/Parsing/Builders/Variadics.swift
+++ b/Sources/Parsing/Builders/Variadics.swift
@@ -1,1127 +1,1163 @@
// BEGIN AUTO-GENERATED CONTENT
-extension ParserBuilder {
- public struct ZipOO: Parser
+#if swift(<5.7)
+
+ extension ParserBuilder {
+ public struct ZipOO: Parser
+ where
+ P0.Input == P1.Input
+ {
+ public let p0: P0, p1: P1
+
+ @inlinable public init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ return (o0, o1)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
P0.Input == P1.Input
{
- public let p0: P0, p1: P1
-
- @inlinable public init(_ p0: P0, _ p1: P1) {
- self.p0 = p0
- self.p1 = p1
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- return (o0, o1)
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1
+ ) -> ParserBuilder.ZipOO {
+ ParserBuilder.ZipOO(p0, p1)
}
}
-}
-extension ParserBuilder.ZipOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P0.Input == P1.Input
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1
+
+ @inlinable public init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1
- ) -> ParserBuilder.ZipOO {
- ParserBuilder.ZipOO(p0, p1)
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ return o0
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipOV: Parser
+ extension ParserBuilder.ZipOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
P0.Input == P1.Input,
P1.Output == Void
{
- public let p0: P0, p1: P1
-
- @inlinable public init(_ p0: P0, _ p1: P1) {
- self.p0 = p0
- self.p1 = p1
+ @inlinable public func print(
+ _ output: P0.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p1.print(into: &input)
+ try p0.print(output, into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- return o0
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1
+ ) -> ParserBuilder.ZipOV {
+ ParserBuilder.ZipOV(p0, p1)
}
}
-}
-extension ParserBuilder.ZipOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P0.Input == P1.Input,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: P0.Output,
- into input: inout P0.Input
- ) rethrows {
- try p1.print(into: &input)
- try p0.print(output, into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipVO: Parser
+ where
+ P0.Input == P1.Input,
+ P0.Output == Void
+ {
+ public let p0: P0, p1: P1
+
+ @inlinable public init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1
- ) -> ParserBuilder.ZipOV {
- ParserBuilder.ZipOV(p0, p1)
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ return o1
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipVO: Parser
+ extension ParserBuilder.ZipVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
P0.Input == P1.Input,
P0.Output == Void
{
- public let p0: P0, p1: P1
-
- @inlinable public init(_ p0: P0, _ p1: P1) {
- self.p0 = p0
- self.p1 = p1
+ @inlinable public func print(
+ _ output: P1.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p1.print(output, into: &input)
+ try p0.print(into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- return o1
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1
+ ) -> ParserBuilder.ZipVO {
+ ParserBuilder.ZipVO(p0, p1)
}
}
-}
-extension ParserBuilder.ZipVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P0.Input == P1.Input,
- P0.Output == Void
-{
- @inlinable public func print(
- _ output: P1.Output,
- into input: inout P0.Input
- ) rethrows {
- try p1.print(output, into: &input)
- try p0.print(into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipVV: Parser
+ where
+ P0.Input == P1.Input,
+ P0.Output == Void,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1
- ) -> ParserBuilder.ZipVO {
- ParserBuilder.ZipVO(p0, p1)
+ @inlinable public init(_ p0: P0, _ p1: P1) {
+ self.p0 = p0
+ self.p1 = p1
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipVV: Parser
+ extension ParserBuilder.ZipVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
P0.Input == P1.Input,
P0.Output == Void,
P1.Output == Void
{
- public let p0: P0, p1: P1
-
- @inlinable public init(_ p0: P0, _ p1: P1) {
- self.p0 = p0
- self.p1 = p1
+ @inlinable public func print(
+ _ output: Void,
+ into input: inout P0.Input
+ ) rethrows {
+ try p1.print(into: &input)
+ try p0.print(into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1
+ ) -> ParserBuilder.ZipVV {
+ ParserBuilder.ZipVV(p0, p1)
}
}
-}
-extension ParserBuilder.ZipVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P0.Input == P1.Input,
- P0.Output == Void,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: Void,
- into input: inout P0.Input
- ) rethrows {
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipOOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input
+ {
+ public let p0: P0, p1: P1, p2: P2
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1
- ) -> ParserBuilder.ZipVV {
- ParserBuilder.ZipVV(p0, p1)
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ return (o0, o1, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipOOO: Parser
+ extension ParserBuilder.ZipOOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- return (o0, o1, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipOOO {
- ParserBuilder.ZipOOO(p0, p1, p2)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipOOO {
+ ParserBuilder.ZipOOO(p0, p1, p2)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ return (o0, o1)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- return (o0, o1)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p2.print(into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipOOV {
- ParserBuilder.ZipOOV(p0, p1, p2)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipOOV {
+ ParserBuilder.ZipOOV(p0, p1, p2)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P2.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ return (o0, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P1.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P2.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- return (o0, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p2.print(output.1, into: &input)
- try p1.print(into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipOVO {
- ParserBuilder.ZipOVO(p0, p1, p2)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(output.1, into: &input)
+ try p1.print(into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipOVO {
+ ParserBuilder.ZipOVO(p0, p1, p2)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P1.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ return o0
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P1.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
+ @inlinable public func print(
+ _ output: P0.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(output, into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- return o0
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipOVV {
+ ParserBuilder.ZipOVV(p0, p1, p2)
}
}
-}
-extension ParserBuilder.ZipOVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P1.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: P0.Output,
- into input: inout P0.Input
- ) rethrows {
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(output, into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipVOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P0.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipOVV {
- ParserBuilder.ZipOVV(p0, p1, p2)
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P1.Output,
+ P2.Output
+ ) {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ return (o1, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipVOO: Parser
+ extension ParserBuilder.ZipVOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P0.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P1.Output,
- P2.Output
- ) {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- return (o1, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P0.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P1.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p2.print(output.1, into: &input)
- try p1.print(output.0, into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipVOO {
- ParserBuilder.ZipVOO(p0, p1, p2)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P1.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(output.1, into: &input)
+ try p1.print(output.0, into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipVOO {
+ ParserBuilder.ZipVOO(p0, p1, p2)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P0.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ return o1
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P0.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
+ @inlinable public func print(
+ _ output: P1.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(into: &input)
+ try p1.print(output, into: &input)
+ try p0.print(into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- return o1
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipVOV {
+ ParserBuilder.ZipVOV(p0, p1, p2)
}
}
-}
-extension ParserBuilder.ZipVOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P0.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: P1.Output,
- into input: inout P0.Input
- ) rethrows {
- try p2.print(into: &input)
- try p1.print(output, into: &input)
- try p0.print(into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipVVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P0.Output == Void,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipVOV {
- ParserBuilder.ZipVOV(p0, p1, p2)
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P2.Output {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ return o2
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipVVO: Parser
+ extension ParserBuilder.ZipVVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P0.Output == Void,
P1.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
+ @inlinable public func print(
+ _ output: P2.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(output, into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P2.Output {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- return o2
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipVVO {
+ ParserBuilder.ZipVVO(p0, p1, p2)
}
}
-}
-extension ParserBuilder.ZipVVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P0.Output == Void,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: P2.Output,
- into input: inout P0.Input
- ) rethrows {
- try p2.print(output, into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipVVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P0.Output == Void,
+ P1.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipVVO {
- ParserBuilder.ZipVVO(p0, p1, p2)
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipVVV: Parser
+ extension ParserBuilder.ZipVVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P0.Output == Void,
P1.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
+ @inlinable public func print(
+ _ output: Void,
+ into input: inout P0.Input
+ ) rethrows {
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
}
+ }
- @inlinable public func parse(_ input: inout P0.Input) rethrows {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- } catch { throw ParsingError.wrap(error, at: input) }
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2
+ ) -> ParserBuilder.ZipVVV {
+ ParserBuilder.ZipVVV(p0, p1, p2)
}
}
-}
-extension ParserBuilder.ZipVVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P0.Output == Void,
- P1.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: Void,
- into input: inout P0.Input
- ) rethrows {
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
+ extension ParserBuilder {
+ public struct ZipOOOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2
- ) -> ParserBuilder.ZipVVV {
- ParserBuilder.ZipVVV(p0, p1, p2)
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o0, o1, o2, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
}
-}
-extension ParserBuilder {
- public struct ZipOOOO: Parser
+ extension ParserBuilder.ZipOOOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o0, o1, o2, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.3, into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOOOO {
- ParserBuilder.ZipOOOO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.3, into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOOOO {
+ ParserBuilder.ZipOOOO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ return (o0, o1, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- return (o0, o1, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOOOV {
- ParserBuilder.ZipOOOV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOOOV {
+ ParserBuilder.ZipOOOV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o0, o1, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o0, o1, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.2, into: &input)
- try p2.print(into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOOVO {
- ParserBuilder.ZipOOVO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOVV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.2, into: &input)
+ try p2.print(into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOOVO {
+ ParserBuilder.ZipOOVO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P2.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ try p3.parse(&input)
+ return (o0, o1)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P2.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- try p3.parse(&input)
- return (o0, o1)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P2.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOOVV {
- ParserBuilder.ZipOOVV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVOO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOOVV {
+ ParserBuilder.ZipOOVV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P2.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o0, o2, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P1.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P2.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o0, o2, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOVOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P2.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.2, into: &input)
- try p2.print(output.1, into: &input)
- try p1.print(into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOVOO {
- ParserBuilder.ZipOVOO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P2.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.2, into: &input)
+ try p2.print(output.1, into: &input)
+ try p1.print(into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOVOO {
+ ParserBuilder.ZipOVOO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P1.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P2.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ return (o0, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P1.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P2.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- return (o0, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOVOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P1.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(output.1, into: &input)
- try p1.print(into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOVOV {
- ParserBuilder.ZipOVOV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(output.1, into: &input)
+ try p1.print(into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOVOV {
+ ParserBuilder.ZipOVOV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P1.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o0, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P1.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o0, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOVVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P1.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.1, into: &input)
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOVVO {
- ParserBuilder.ZipOVVO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOVVV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.1, into: &input)
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOVVO {
+ ParserBuilder.ZipOVVO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOVVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P1.Output == Void,
+ P2.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
+ do {
+ let o0 = try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ try p3.parse(&input)
+ return o0
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOVVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1129,263 +1165,263 @@ extension ParserBuilder {
P2.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P0.Output {
- do {
- let o0 = try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- try p3.parse(&input)
- return o0
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOVVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P1.Output == Void,
- P2.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: P0.Output,
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(output, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipOVVV {
- ParserBuilder.ZipOVVV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVOOO: Parser
+ @inlinable public func print(
+ _ output: P0.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(output, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipOVVV {
+ ParserBuilder.ZipOVVV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVOOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ) {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o1, o2, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVOOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P0.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P1.Output,
- P2.Output,
- P3.Output
- ) {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o1, o2, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVOOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P1.Output,
- P2.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.2, into: &input)
- try p2.print(output.1, into: &input)
- try p1.print(output.0, into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVOOO {
- ParserBuilder.ZipVOOO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVOOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.2, into: &input)
+ try p2.print(output.1, into: &input)
+ try p1.print(output.0, into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVOOO {
+ ParserBuilder.ZipVOOO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVOOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P1.Output,
+ P2.Output
+ ) {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ return (o1, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVOOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P0.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P1.Output,
- P2.Output
- ) {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- return (o1, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVOOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P1.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(output.1, into: &input)
- try p1.print(output.0, into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVOOV {
- ParserBuilder.ZipVOOV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVOVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P1.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(output.1, into: &input)
+ try p1.print(output.0, into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVOOV {
+ ParserBuilder.ZipVOOV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVOVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P1.Output,
+ P3.Output
+ ) {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o1, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVOVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P0.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P1.Output,
- P3.Output
- ) {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o1, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVOVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P1.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.1, into: &input)
- try p2.print(into: &input)
- try p1.print(output.0, into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVOVO {
- ParserBuilder.ZipVOVO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVOVV: Parser
+ @inlinable public func print(
+ _ output: (
+ P1.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.1, into: &input)
+ try p2.print(into: &input)
+ try p1.print(output.0, into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVOVO {
+ ParserBuilder.ZipVOVO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVOVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P2.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
+ do {
+ try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ try p3.parse(&input)
+ return o1
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVOVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1393,129 +1429,129 @@ extension ParserBuilder {
P2.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P1.Output {
- do {
- try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- try p3.parse(&input)
- return o1
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVOVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P2.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: P1.Output,
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(into: &input)
- try p1.print(output, into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVOVV {
- ParserBuilder.ZipVOVV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVVOO: Parser
+ @inlinable public func print(
+ _ output: P1.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(into: &input)
+ try p1.print(output, into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVOVV {
+ ParserBuilder.ZipVOVV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVVOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P1.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P2.Output,
+ P3.Output
+ ) {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return (o2, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVVOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P0.Output == Void,
P1.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P2.Output,
- P3.Output
- ) {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return (o2, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVVOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P1.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P2.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output.1, into: &input)
- try p2.print(output.0, into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVVOO {
- ParserBuilder.ZipVVOO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVVOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P2.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output.1, into: &input)
+ try p2.print(output.0, into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVVOO {
+ ParserBuilder.ZipVVOO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVVOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P1.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P2.Output {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ return o2
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVVOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1523,62 +1559,62 @@ extension ParserBuilder {
P1.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P2.Output {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- return o2
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVVOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P1.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: P2.Output,
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(output, into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVVOV {
- ParserBuilder.ZipVVOV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVVVO: Parser
+ @inlinable public func print(
+ _ output: P2.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(output, into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVVOV {
+ ParserBuilder.ZipVVOV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVVVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P1.Output == Void,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> P3.Output {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ return o3
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVVVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1586,62 +1622,62 @@ extension ParserBuilder {
P1.Output == Void,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> P3.Output {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- return o3
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVVVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P1.Output == Void,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: P3.Output,
- into input: inout P0.Input
- ) rethrows {
- try p3.print(output, into: &input)
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVVVO {
- ParserBuilder.ZipVVVO(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipVVVV: Parser
+ @inlinable public func print(
+ _ output: P3.Output,
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(output, into: &input)
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVVVO {
+ ParserBuilder.ZipVVVO(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipVVVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P0.Output == Void,
+ P1.Output == Void,
+ P2.Output == Void,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows {
+ do {
+ try p0.parse(&input)
+ try p1.parse(&input)
+ try p2.parse(&input)
+ try p3.parse(&input)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipVVVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1650,287 +1686,294 @@ extension ParserBuilder {
P2.Output == Void,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows {
- do {
- try p0.parse(&input)
- try p1.parse(&input)
- try p2.parse(&input)
- try p3.parse(&input)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipVVVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P0.Output == Void,
- P1.Output == Void,
- P2.Output == Void,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: Void,
- into input: inout P0.Input
- ) rethrows {
- try p3.print(into: &input)
- try p2.print(into: &input)
- try p1.print(into: &input)
- try p0.print(into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
- ) -> ParserBuilder.ZipVVVV {
- ParserBuilder.ZipVVVV(p0, p1, p2, p3)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOOOO: Parser
+ @inlinable public func print(
+ _ output: Void,
+ into input: inout P0.Input
+ ) rethrows {
+ try p3.print(into: &input)
+ try p2.print(into: &input)
+ try p1.print(into: &input)
+ try p0.print(into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3
+ ) -> ParserBuilder.ZipVVVV {
+ ParserBuilder.ZipVVVV(p0, p1, p2, p3)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOOOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output,
+ P4.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ let o4 = try p4.parse(&input)
+ return (o0, o1, o2, o3, o4)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOOOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P3.Input == P4.Input
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output,
- P4.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- let o4 = try p4.parse(&input)
- return (o0, o1, o2, o3, o4)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output,
- P4.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(output.4, into: &input)
- try p3.print(output.3, into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOOOO {
- ParserBuilder.ZipOOOOO(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOOOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output,
+ P4.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(output.4, into: &input)
+ try p3.print(output.3, into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOOOO {
+ ParserBuilder.ZipOOOOO(p0, p1, p2, p3, p4)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOOOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input,
+ P4.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ try p4.parse(&input)
+ return (o0, o1, o2, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOOOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P3.Input == P4.Input,
P4.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- let o3 = try p3.parse(&input)
- try p4.parse(&input)
- return (o0, o1, o2, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input,
- P4.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(into: &input)
- try p3.print(output.3, into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOOOV {
- ParserBuilder.ZipOOOOV(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOOVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(into: &input)
+ try p3.print(output.3, into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOOOV {
+ ParserBuilder.ZipOOOOV(p0, p1, p2, p3, p4)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOOVO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input,
+ P3.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P4.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ let o4 = try p4.parse(&input)
+ return (o0, o1, o2, o4)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOOVO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P3.Input == P4.Input,
P3.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output,
- P4.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- let o4 = try p4.parse(&input)
- return (o0, o1, o2, o4)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOVO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input,
- P3.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output,
- P4.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(output.3, into: &input)
- try p3.print(into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOOVO {
- ParserBuilder.ZipOOOVO(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOOVV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output,
+ P4.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(output.3, into: &input)
+ try p3.print(into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOOVO {
+ ParserBuilder.ZipOOOVO(p0, p1, p2, p3, p4)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOOVV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input,
+ P3.Output == Void,
+ P4.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ let o2 = try p2.parse(&input)
+ try p3.parse(&input)
+ try p4.parse(&input)
+ return (o0, o1, o2)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOOVV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -1938,149 +1981,149 @@ extension ParserBuilder {
P3.Output == Void,
P4.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P2.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- let o2 = try p2.parse(&input)
- try p3.parse(&input)
- try p4.parse(&input)
- return (o0, o1, o2)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOOVV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input,
- P3.Output == Void,
- P4.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P2.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(into: &input)
- try p3.print(into: &input)
- try p2.print(output.2, into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOOVV {
- ParserBuilder.ZipOOOVV(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOVOO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P2.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(into: &input)
+ try p3.print(into: &input)
+ try p2.print(output.2, into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOOVV {
+ ParserBuilder.ZipOOOVV(p0, p1, p2, p3, p4)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOVOO: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input,
+ P2.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P3.Output,
+ P4.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ let o4 = try p4.parse(&input)
+ return (o0, o1, o3, o4)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOVOO: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
P3.Input == P4.Input,
P2.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P3.Output,
- P4.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- let o4 = try p4.parse(&input)
- return (o0, o1, o3, o4)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOVOO: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input,
- P2.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P3.Output,
- P4.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(output.3, into: &input)
- try p3.print(output.2, into: &input)
- try p2.print(into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOVOO {
- ParserBuilder.ZipOOVOO(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOVOV: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P3.Output,
+ P4.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(output.3, into: &input)
+ try p3.print(output.2, into: &input)
+ try p2.print(into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOVOO {
+ ParserBuilder.ZipOOVOO(p0, p1, p2, p3, p4)
+ }
+ }
+
+ extension ParserBuilder {
+ public struct ZipOOVOV: Parser
+ where
+ P0.Input == P1.Input,
+ P1.Input == P2.Input,
+ P2.Input == P3.Input,
+ P3.Input == P4.Input,
+ P2.Output == Void,
+ P4.Output == Void
+ {
+ public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
+
+ @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
+ self.p0 = p0
+ self.p1 = p1
+ self.p2 = p2
+ self.p3 = p3
+ self.p4 = p4
+ }
+
+ @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
+ P0.Output,
+ P1.Output,
+ P3.Output
+ ) {
+ do {
+ let o0 = try p0.parse(&input)
+ let o1 = try p1.parse(&input)
+ try p2.parse(&input)
+ let o3 = try p3.parse(&input)
+ try p4.parse(&input)
+ return (o0, o1, o3)
+ } catch { throw ParsingError.wrap(error, at: input) }
+ }
+ }
+ }
+
+ extension ParserBuilder.ZipOOVOV: ParserPrinter
where
+ P0: ParserPrinter,
+ P1: ParserPrinter,
+ P2: ParserPrinter,
+ P3: ParserPrinter,
+ P4: ParserPrinter,
P0.Input == P1.Input,
P1.Input == P2.Input,
P2.Input == P3.Input,
@@ -2088,74 +2131,74 @@ extension ParserBuilder {
P2.Output == Void,
P4.Output == Void
{
- public let p0: P0, p1: P1, p2: P2, p3: P3, p4: P4
-
- @inlinable public init(_ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4) {
- self.p0 = p0
- self.p1 = p1
- self.p2 = p2
- self.p3 = p3
- self.p4 = p4
- }
-
- @inlinable public func parse(_ input: inout P0.Input) rethrows -> (
- P0.Output,
- P1.Output,
- P3.Output
- ) {
- do {
- let o0 = try p0.parse(&input)
- let o1 = try p1.parse(&input)
- try p2.parse(&input)
- let o3 = try p3.parse(&input)
- try p4.parse(&input)
- return (o0, o1, o3)
- } catch { throw ParsingError.wrap(error, at: input) }
- }
- }
-}
-
-extension ParserBuilder.ZipOOVOV: ParserPrinter
-where
- P0: ParserPrinter,
- P1: ParserPrinter,
- P2: ParserPrinter,
- P3: ParserPrinter,
- P4: ParserPrinter,
- P0.Input == P1.Input,
- P1.Input == P2.Input,
- P2.Input == P3.Input,
- P3.Input == P4.Input,
- P2.Output == Void,
- P4.Output == Void
-{
- @inlinable public func print(
- _ output: (
- P0.Output,
- P1.Output,
- P3.Output
- ),
- into input: inout P0.Input
- ) rethrows {
- try p4.print(into: &input)
- try p3.print(output.2, into: &input)
- try p2.print(into: &input)
- try p1.print(output.1, into: &input)
- try p0.print(output.0, into: &input)
- }
-}
-
-extension ParserBuilder {
- @inlinable public static func buildBlock(
- _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
- ) -> ParserBuilder.ZipOOVOV {
- ParserBuilder.ZipOOVOV(p0, p1, p2, p3, p4)
- }
-}
-
-extension ParserBuilder {
- public struct ZipOOVVO: Parser
+ @inlinable public func print(
+ _ output: (
+ P0.Output,
+ P1.Output,
+ P3.Output
+ ),
+ into input: inout P0.Input
+ ) rethrows {
+ try p4.print(into: &input)
+ try p3.print(output.2, into: &input)
+ try p2.print(into: &input)
+ try p1.print(output.1, into: &input)
+ try p0.print(output.0, into: &input)
+ }
+ }
+
+ extension ParserBuilder {
+ @inlinable public static func buildBlock(
+ _ p0: P0, _ p1: P1, _ p2: P2, _ p3: P3, _ p4: P4
+ ) -> ParserBuilder.ZipOOVOV