Verified Commit 5cba66b5 authored by Camil Staps's avatar Camil Staps 🚀

Fix ^ matching

parent a2d38e31
......@@ -11,7 +11,7 @@ EXE:=example test
all: $(EXE)
run_test: test
diff -y testdata/testoutput1 <(./test -nr < testdata/testinput1) | grep -v -e '^#' | less
diff -Z -y testdata/testoutput1 <(./test -nr < testdata/testinput1) | grep -v -e '^#' | less
$(EXE): %: %.icl $(DEPS)
$(CLM) $(CLMFLAGS) $@ -o $@
......
......@@ -58,8 +58,7 @@ match` (Group id r) st
= [{st` & groups=put id (drop (length st.matched) st`.matched) st`.groups}
\\ st` <- match` r st]
where put id m gs = [(id,m):filter ((<>) id o fst) gs]
match` r=:StartOfString st
= matchOrSkip r st $ if (isEmpty st.matched) [{st & can_skip=False}] []
match` r=:StartOfString st = if (isEmpty st.matched) [{st & can_skip=False}] []
match` r=:EndOfString st
= matchOrSkip r st $ if (isEmpty st.unseen) [st] []
match` r=:(WordBreak n) st
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment