diff options
author | dos-reis <gdr@axiomatics.org> | 2008-12-14 23:29:08 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-12-14 23:29:08 +0000 |
commit | d338fac5f30034125dceaf6ab952018d8cba5a76 (patch) | |
tree | f7f052dc9aa02fb9a083512380ba0ef5ddc27676 /src/interp/wi1.boot | |
parent | 58ad76c4d99b58ebda2f24ac0f88bbccedbc7135 (diff) | |
download | open-axiom-d338fac5f30034125dceaf6ab952018d8cba5a76.tar.gz |
r12459@gauss: gdr | 2008-12-12 18:18:31 -0600
Tidy compApplyModemap.
r12460@gauss: gdr | 2008-12-13 09:24:50 -0600
Tidy compMapCond.
r12461@gauss: gdr | 2008-12-13 10:24:14 -0600
Activate compViableModemap.
r12462@gauss: gdr | 2008-12-13 11:18:17 -0600
Remove pmatch and pmatchWithSl out of main compiler.
r12463@gauss: gdr | 2008-12-13 12:26:44 -0600
Tidy compApplyModemap.
r12464@gauss: gdr | 2008-12-13 16:39:28 -0600
Add compExclusiveOr.
r12465@gauss: gdr | 2008-12-13 16:54:58 -0600
.
r12466@gauss: gdr | 2008-12-14 15:01:33 -0600
Tidy compLogicalNot.
Diffstat (limited to 'src/interp/wi1.boot')
-rw-r--r-- | src/interp/wi1.boot | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/interp/wi1.boot b/src/interp/wi1.boot index f149f1b2..201a8a71 100644 --- a/src/interp/wi1.boot +++ b/src/interp/wi1.boot @@ -83,6 +83,17 @@ addBinding(var,proplist,e is [[curContour,:tailContour],:tailEnv]) == --Previous line should save some space [[[lx,:curContour],:tailContour],:tailEnv] where lx:= [var,:proplist] + +pmatch(s,p) == pmatchWithSl(s,p,"ok") + +pmatchWithSl(s,p,al) == + s=$EmptyMode => nil + s=p => al + v:= assoc(p,al) => s=rest v or al + MEMQ(p,$PatternVariableList) => [[p,:s],:al] + null atom p and null atom s and (al':= pmatchWithSl(first s,first p,al)) and + pmatchWithSl(rest s,rest p,al') + --====================================================================== -- From define.boot --====================================================================== |