From ac67f6fde0047fd283a6aba631c2dcd9ddc130d3 Mon Sep 17 00:00:00 2001 From: Milan Lustig Date: Sun, 8 Sep 2024 22:03:10 -0400 Subject: [PATCH] Fixed issue in rframe with new filter alt --- src/core/grammar/regex/RFrame.re | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/grammar/regex/RFrame.re b/src/core/grammar/regex/RFrame.re index ec101cb9..f96d95ab 100644 --- a/src/core/grammar/regex/RFrame.re +++ b/src/core/grammar/regex/RFrame.re @@ -37,10 +37,13 @@ let opt_ = Alt_([Regex.eps], []); let aseq_ = (ls, rs) => seq_(List.map(Regex.atom, ls), List.map(Regex.atom, rs)); +let retuple_alt = (rs: list('a)): list((string, 'a)) => + List.map(r => ("", r), rs); + let zip = (f: t(_), r: Regex.t(_)) => switch (f) { | Star_ => Regex.Star(r) - | Alt_(ls, rs) => Alt(List.rev(ls) @ [r, ...rs]) + | Alt_(ls, rs) => Alt(retuple_alt(List.rev(ls) @ [r, ...rs])) | Seq_(ls, rs) => Seq(List.rev(ls) @ [r, ...rs]) };