diff options
author | dos-reis <gdr@axiomatics.org> | 2011-11-26 20:11:59 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-11-26 20:11:59 +0000 |
commit | b91436e16c46bb3c8b0fa22d4f81eb8743f6cbd7 (patch) | |
tree | 94aa152472dbe57557213cb97bc466ef875a125a /src/interp | |
parent | d80f7180b482bb3f61954d1260aad9a9fac81fa7 (diff) | |
download | open-axiom-b91436e16c46bb3c8b0fa22d4f81eb8743f6cbd7.tar.gz |
* algebra/indexedp.spad.pamphlet: Avoid direct use or RPLACD.
* algebra/poly.spad.pamphlet: Likewise.
* interp/define.boot (spadCompileOrSetq): Tidy replacement info.
* interp/i-output.boot ($BinaryOperators): New.
(binaryInfix?): Tidy.
Diffstat (limited to 'src/interp')
-rw-r--r-- | src/interp/define.boot | 6 | ||||
-rw-r--r-- | src/interp/format.boot | 2 | ||||
-rw-r--r-- | src/interp/i-output.boot | 13 |
3 files changed, 16 insertions, 5 deletions
diff --git a/src/interp/define.boot b/src/interp/define.boot index abc12e16..8204957c 100644 --- a/src/interp/define.boot +++ b/src/interp/define.boot @@ -2004,8 +2004,10 @@ spadCompileOrSetq(db,form is [nam,[lam,vl,body]]) == registerFunctionReplacement(nam,nam') sayBrightly ['" ",:bright nam,'"is replaced by",:bright nam'] else if macform := expandableDefinition?(vl,body) then - registerFunctionReplacement(nam,macform) - sayBrightly ['" ",:bright nam,'"is replaced by",:bright body] + registerFunctionReplacement(nam,macform) + [:vl',.] := vl + sayBrightly ['" ",:bright prefix2String [nam,:vl'], + '"is replaced by",:bright prefix2String body] form := getFunctionReplacement nam => diff --git a/src/interp/format.boot b/src/interp/format.boot index 0d4f3d4b..41033b90 100644 --- a/src/interp/format.boot +++ b/src/interp/format.boot @@ -446,7 +446,7 @@ form2String1 u == argl := rest argl (null argl) or null (first argl) => [lo, '".."] [lo, '"..", form2String1 first argl] - isBinaryInfix op => formatAsFortranExpression [op,:argl] + binaryInfix? op => formatAsFortranExpression [op,:argl] application2String(op,[form2String1 x for x in argl], u1) formWrapId id == diff --git a/src/interp/i-output.boot b/src/interp/i-output.boot index af86f29e..d734fbc1 100644 --- a/src/interp/i-output.boot +++ b/src/interp/i-output.boot @@ -469,8 +469,17 @@ rbrkSch() == symbolName specialChar 'rbrk lbrkSch() == symbolName specialChar 'lbrk quadSch() == symbolName specialChar 'quad -isBinaryInfix x == - member(x, '(_= _+ _- _* _/ _*_* _^ "=" "+" "-" "*" "/" "**" "^")) +++ List of binary operators +$BinaryOperators == + ["**", "^", "*", "/", "//", "\", "\\", "rem", "quo", "exquo", "+", "-", + "/\", "\/", "=", "~=", "<", "<=", ">", ">=", "and", "or", ">>", "<<", + "by", "has", "case", "->", "..", "|"] + + +binaryInfix? x == + ident? x => symbolMember?(x,$BinaryOperators) + string? x => symbolMember?(makeSymbol x,$BinaryOperators) + false stringApp([.,u],x,y,d) == appChar(strconc($DoubleQuote,atom2String u,$DoubleQuote),x,y,d) |