aboutsummaryrefslogtreecommitdiff
path: root/src/interp/match.boot
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-05-28 14:09:02 +0000
committerdos-reis <gdr@axiomatics.org>2012-05-28 14:09:02 +0000
commit62a125276f6dc3acedaf11af209b7e4c02306128 (patch)
tree81cf15675a49410d21e6277b7e5230b86232fd26 /src/interp/match.boot
parent7be5c459a3b8d02d87e3a21edabfbf7227df613c (diff)
downloadopen-axiom-62a125276f6dc3acedaf11af209b7e4c02306128.tar.gz
* interp/io.boot (findChar): Do not define here.
* interp/match.boot (charPosition): Likewise. * boot/utility.boot (charPosition): Now return argument string length if no match. (findChar): New. * boot/scanner.boot (lexerCharPosition): Adjust. (shoeAccumulateLines): Use findChar.
Diffstat (limited to 'src/interp/match.boot')
-rw-r--r--src/interp/match.boot9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/interp/match.boot b/src/interp/match.boot
index 7e8144f9..b8c92e10 100644
--- a/src/interp/match.boot
+++ b/src/interp/match.boot
@@ -56,15 +56,6 @@ anySubstring?(part,whole,startpos) ==
or/[((k := i) and "and"/[CHAR_-EQUAL(part.ip,whole.iw)
for ip in 0..np - 1 for iw in i..]) for i in startpos..nw - np] => k
-charPosition(c,t,startpos) ==
- n := # t
- startpos < 0 or startpos > n => n
- k:= startpos
- for i in startpos .. n-1 repeat
- c = t.i => return nil
- k := k+1
- k
-
rightCharPosition(c,t,startpos) == --startpos often equals maxIndex t (rightmost)
k := startpos
for i in startpos..0 by -1 while c ~= stringChar(t,i) repeat (k := k - 1)