diff options
-rw-r--r-- | src/interp/ChangeLog | 8 | ||||
-rw-r--r-- | src/interp/compiler.boot | 19 | ||||
-rw-r--r-- | src/interp/nspadaux.lisp | 1 | ||||
-rw-r--r-- | src/interp/parse.boot | 4 | ||||
-rw-r--r-- | src/interp/postprop.lisp | 2 | ||||
-rw-r--r-- | src/interp/property.lisp | 2 |
6 files changed, 27 insertions, 9 deletions
diff --git a/src/interp/ChangeLog b/src/interp/ChangeLog index a5b6346f..ed40cfbb 100644 --- a/src/interp/ChangeLog +++ b/src/interp/ChangeLog @@ -1,3 +1,11 @@ +2007-11-26 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * compiler.boot (compileNot): New. + * nspadaux.lisp: Don't register special parser for `not'-form. + * postprop.lisp: Likewise. + * property.lisp: Likewise. + * parse.boot (parseNot): Remove. + 2007-11-25 Gabriel Dos Reis <gdr@cs.tamu.edu> Remove depsys from OpenAxiom. diff --git a/src/interp/compiler.boot b/src/interp/compiler.boot index 75f28a10..7e2d3066 100644 --- a/src/interp/compiler.boot +++ b/src/interp/compiler.boot @@ -987,6 +987,25 @@ compImport(["import",:doms],m,e) == for dom in doms repeat e:=addDomain(dom,e) ["/throwAway",$NoValueMode,e] +--% Compilation of logical operators that may have a pre-defined +--% meaning, or may need special handling because or short-circuiting +--% etc. + +++ compile a logical negation form `(not ...)'. +compileNot(x,m,e) == + x isn't ["not", y] => nil + -- If there is a modemap available that can make this work, just use it. + T := compForm(x,m,e) => T + + -- Otherwise, we may be in a case where we might want to apply + -- built-in Boolean meaning. Eventually, we should not need to + -- do this special case here. + [xcode, xmode, xtrueEnv, xfalseEnv] := compBoolean(y, $Boolean, e) + or return nil + convert([["NOT", xcode], $Boolean, xfalseEnv], m) + + + --Will the jerk who commented out these two functions please NOT do so --again. These functions ARE needed, and case can NOT be done by --modemap alone. The reason is that A case B requires to take A diff --git a/src/interp/nspadaux.lisp b/src/interp/nspadaux.lisp index 26c431ca..30e55021 100644 --- a/src/interp/nspadaux.lisp +++ b/src/interp/nspadaux.lisp @@ -56,7 +56,6 @@ (setq |$spadTightList| '(\.\. \# \' \:\ \: \:\:)) (setq |$PerCentVariableList| '(%1 %2 %3 %4 %5 %6 %7 %8 %9 %10)) -(makeprop '_^ '|parseTran| '|parseNot|) (mapcar #'(lambda (X) (MAKEPROP (CAR X) 'SPECIAL (CADR X))) '((PART |compPART|) diff --git a/src/interp/parse.boot b/src/interp/parse.boot index acecc6bd..3c0237e5 100644 --- a/src/interp/parse.boot +++ b/src/interp/parse.boot @@ -333,10 +333,6 @@ parseOr u == (x:= parseTran first u) is ["not",y] => parseIf [y,parseOr rest u,"true"] true => parseIf [x,"true",parseOr rest u] -parseNot u == - $InteractiveMode => ["not",parseTran first u] - parseTran ["IF",first u,:'(false true)] - parseEquivalence [a,b] == parseIf [a,b,parseIf [b,:'(false true)]] parseImplies [a,b] == parseIf [a,b,"true"] diff --git a/src/interp/postprop.lisp b/src/interp/postprop.lisp index 857ec26b..f79f01ff 100644 --- a/src/interp/postprop.lisp +++ b/src/interp/postprop.lisp @@ -100,7 +100,6 @@ ($\> |parseDollarGreaterThan|) ($\>= |parseDollarGreaterEqual|) ($^= |parseDollarNotEqual|) - (^ |parseNot|) (^= |parseNotEqual|) (\: |parseColon|) (\:\: |parseCoerce|) @@ -123,7 +122,6 @@ (LET |parseLET|) (LETD |parseLETD|) (MDEF |parseMDEF|) - (|not| |parseNot|) (|or| |parseOr|) (|pretend| |parsePretend|) (|return| |parseReturn|) diff --git a/src/interp/property.lisp b/src/interp/property.lisp index d3be6d36..0879574b 100644 --- a/src/interp/property.lisp +++ b/src/interp/property.lisp @@ -358,7 +358,6 @@ (|$>| |parseDollarGreaterThan|) (|$>=| |parseDollarGreaterEqual|) ($^= |parseDollarNotEqual|) - (^ |parseNot|) (^= |parseNotEqual|) (\: |parseColon|) (|::| |parseCoerce|) @@ -387,7 +386,6 @@ (LET |parseLET|) (LETD |parseLETD|) (MDEF |parseMDEF|) - (|not| |parseNot|) (|or| |parseOr|) (|pretend| |parsePretend|) (|return| |parseReturn|) |