aboutsummaryrefslogtreecommitdiff
path: root/src/interp/match.boot.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/match.boot.pamphlet')
-rw-r--r--src/interp/match.boot.pamphlet13
1 files changed, 8 insertions, 5 deletions
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 @@
<<*>>=
<<license>>
-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