From 9f40d01ca05e7c6588be3181fd14a90305849015 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 21 Oct 2007 10:33:32 +0000 Subject: * Makefile.pamphlet (<>): Remove. (<>): Likewise. (fortcall.$(FASLEXT)): New rule. (match.$(FASLEXT)): Likewise. * fortcall.boot.pamphlet: Push into package "BOOT". Import "sys-macros". Fix syntax. * match.boot.pamphlet: Likewise. * patches.lisp (|makeVector): Move to fortcall.boot. (|makeList|): Likewise. --- src/interp/match.boot.pamphlet | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/interp/match.boot.pamphlet') diff --git a/src/interp/match.boot.pamphlet b/src/interp/match.boot.pamphlet index 132b99f9..710aed3e 100644 --- a/src/interp/match.boot.pamphlet +++ b/src/interp/match.boot.pamphlet @@ -46,7 +46,10 @@ <<*>>= <> -SETANDFILEQ($wildCard,char "*") +import '"sys-macros" +)package "BOOT" + +$wildCard := char "*" maskMatch?(mask,subject) == null mask => true @@ -64,7 +67,7 @@ substring?(part, whole, startpos) == anySubstring?(part,whole,startpos) == np := SIZE part nw := SIZE whole - or/[((k := i) and and/[CHAR_-EQUAL(ELT(part, ip),ELT(whole, iw)) + or/[((k := i) and "and"/[CHAR_-EQUAL(ELT(part, ip),ELT(whole, iw)) for ip in 0..np - 1 for iw in i..]) for i in startpos..nw - np] => k charPosition(c,t,startpos) == @@ -83,13 +86,13 @@ rightCharPosition(c,t,startpos) == --startpos often equals MAXINDEX t (rightmost stringPosition(s,t,startpos) == n := SIZE t - if startpos < 0 or startpos > n then error "index out of range" + if startpos < 0 or startpos > n then error '"index out of range" if SIZE s = 0 then return startpos -- bug in STRPOS r := STRPOS(s,t,startpos,NIL) if EQ(r,NIL) then n else r superMatch?(opattern,subject) == --subject assumed to be DOWNCASEd - $wildCard : local := char '_* + $wildCard : local := char "*" pattern := patternCheck opattern logicalMatch?(pattern,subject) @@ -103,7 +106,7 @@ logicalMatch?(pattern,subject) == --subject assumed to be DOWNCASEd patternCheck pattern == main where --checks for escape characters, maybe new $wildCard - main == + main() == -- pattern := pmTransFilter pattern --should no longer need this (rdj:10/1/91) u := pos(char '__,pattern) null u => pattern -- cgit v1.2.3