diff options
author | dos-reis <gdr@axiomatics.org> | 2010-12-15 10:30:34 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-12-15 10:30:34 +0000 |
commit | abc74d7854a504c94f6f66d997d3a2448a0c0322 (patch) | |
tree | 1f2314dd5730c45a14f6c91c24d26d5a71aec7c4 /src | |
parent | ebafd5f858e29cc75f89e098cd8d564cb7d92144 (diff) | |
download | open-axiom-abc74d7854a504c94f6f66d997d3a2448a0c0322.tar.gz |
* interp/msgdb.boot (applyPrefix2String): New.
(substituteSegmentedMsg): Use to implement documented behaviour
of formatting code P.
* interp/i-analy.boot (printableArgModeSetList): Don't call
prefix2String here.
(bottomUpForm0): Likewise.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 9 | ||||
-rw-r--r-- | src/interp/i-analy.boot | 6 | ||||
-rw-r--r-- | src/interp/msgdb.boot | 16 |
3 files changed, 25 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5f41fd6d..21772fcc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2010-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/msgdb.boot (applyPrefix2String): New. + (substituteSegmentedMsg): Use to implement documented behaviour + of formatting code P. + * interp/i-analy.boot (printableArgModeSetList): Don't call + prefix2String here. + (bottomUpForm0): Likewise. + +2010-12-15 Gabriel Dos Reis <gdr@cs.tamu.edu> + * boot/tokens.boot: symbolName is now a builtin function. * interp/sys-utility.boot (stringImage): New. * interp/format.boot (form2String1): Use it. Tidy. diff --git a/src/interp/i-analy.boot b/src/interp/i-analy.boot index 8645b391..7b44377d 100644 --- a/src/interp/i-analy.boot +++ b/src/interp/i-analy.boot @@ -579,9 +579,9 @@ removeUnionsAtStart(argl,modeSets) == printableArgModeSetList() == amsl := nil for a in reverse $origArgModeSetList repeat - b := prefix2String first a + b := first a if atom b then b := [b] - amsl := ['"%l",:b,:amsl] + amsl := ['"%l",b,:amsl] if amsl then amsl := rest amsl amsl @@ -642,7 +642,7 @@ bottomUpForm0(t,op,opName,argl,argModeSetList) == if null(opName1) then opName1 := - (o := getValue op0) => prefix2String objMode o + (o := getValue op0) => objMode o '"<unknown type>" msgKey := null amsl => "S2IB0013" diff --git a/src/interp/msgdb.boot b/src/interp/msgdb.boot index 6e68ae3f..efa3ddff 100644 --- a/src/interp/msgdb.boot +++ b/src/interp/msgdb.boot @@ -153,6 +153,16 @@ removeAttributes msg == attList := rest attList [msg,attList] +applyPrefix2String args == + [:f x for x in args] where + f x == + -- FIXME: we should in fact check for formatting codes + cons? x => g x + [x] + g x == + $texFormatting => prefix2StringAsTeX x + prefix2String x + substituteSegmentedMsg(msg,args) == -- this does substitution of the parameters l := NIL @@ -192,9 +202,9 @@ substituteSegmentedMsg(msg,args) == $texFormatting => arg := prefix2StringAsTeX arg arg := prefix2String arg if char 'P in q then - $texFormatting => arg := [prefix2StringAsTeX x for x in arg] - arg := [prefix2String x for x in arg] - if char 'o in q and $texFormatting then arg := operationLink(arg) + arg := applyPrefix2String arg + if char 'o in q and $texFormatting then + arg := operationLink(arg) if char 'c in q then arg := [['"%ce",:arg]] if char 'r in q then arg := [['"%rj",:arg]] |