diff options
author | dos-reis <gdr@axiomatics.org> | 2008-11-03 02:42:35 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-11-03 02:42:35 +0000 |
commit | 58820ffb5e4e1ba4de8840a4883a1e42857a1a2d (patch) | |
tree | 3c1099cb4b8cc0bc878cd36ca670f9db0af8ead6 /src | |
parent | b1127318c2fc599f970c3f9cba423eaf46ac0564 (diff) | |
download | open-axiom-58820ffb5e4e1ba4de8840a4883a1e42857a1a2d.tar.gz |
* algebra/syntax.spad.pamphlet (Syntax): Print syntax objects as
s-expressions.
* algebra/sex.spad.pamphlet (SExpression): Print strings as
String.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 7 | ||||
-rw-r--r-- | src/algebra/sex.spad.pamphlet | 1 | ||||
-rw-r--r-- | src/algebra/syntax.spad.pamphlet | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8f226992..2572d0a2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,12 @@ 2008-11-02 Gabriel Dos Reis <gdr@cs.tamu.edu> + * algebra/syntax.spad.pamphlet (Syntax): Print syntax objects as + s-expressions. + * algebra/sex.spad.pamphlet (SExpression): Print strings as + String. + +2008-11-02 Gabriel Dos Reis <gdr@cs.tamu.edu> + * interp/Makefile.pamphlet (template.$(FASLEXT)): Remove. * interp/template.boot: Move non-dead code where appropriate. Remove file. diff --git a/src/algebra/sex.spad.pamphlet b/src/algebra/sex.spad.pamphlet index 3e969f92..1175412e 100644 --- a/src/algebra/sex.spad.pamphlet +++ b/src/algebra/sex.spad.pamphlet @@ -112,6 +112,7 @@ SExpressionOf(Str, Sym, Int, Flt, Expr): Decl == Body where coerce(b:%):OutputForm == null? b => paren empty() + string? b => string(b)::OutputForm atom? b => coerce(b)$Rep r := b while not atom? r repeat r := cdr r diff --git a/src/algebra/syntax.spad.pamphlet b/src/algebra/syntax.spad.pamphlet index a649c1f5..e0d71282 100644 --- a/src/algebra/syntax.spad.pamphlet +++ b/src/algebra/syntax.spad.pamphlet @@ -129,8 +129,9 @@ Syntax(): Public == Private where IDENTP(s)$Lisp coerce(x: %): OutputForm == - x case String => outputForm(x : String) - x pretend OutputForm + -- For the moment, print syntax as s-expression. + import SExpression + (x pretend SExpression)::OutputForm convert(x: %): SExpression == x : SExpression |