From 4d1b2073dcb4e91c851bcc2bcab665069bf04fc2 Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Wed, 8 Oct 2025 06:40:20 +0100 Subject: [PATCH] reimplement functionality to run whole text search using DFA --- shell/search-thread.sml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/shell/search-thread.sml b/shell/search-thread.sml index 5d0ed11..e15bbd7 100644 --- a/shell/search-thread.sml +++ b/shell/search-thread.sml @@ -2,12 +2,11 @@ structure SearchThread = struct open CML - (* Prerequisite to sending message: move buffer to end. *) fun loop () = let val (buffer, dfa, time) = Mailbox.recv SearchMailbox.mailbox - val searchList = - raise Fail "todo: reimplement full builder for searchList" + val iterator = LineGap.makeStringIterator buffer + val searchList = SearchList.build (iterator, dfa) val msg = InputMsg.WITH_SEARCH_LIST (searchList, time) val () = InputMailbox.append msg in