From 7948079d6e0b85320ec936e5405112569058115e Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 2 Sep 2008 05:14:28 +0000 Subject: * algebra/syntax.spad.pamphlet (Literal): New. (Identifier): Likewise. (Signature): Tidy. * algebra/exposed.lsp.pamphlet: Expose IDENT and LITERAL. * algebra/Makefile.pamphlet (axiom_algebra_layer_user): Add LITERAL and IDENT. (user-stamp): Don't depend directly on bootstrap-stamp. * share/algebra/: Update databases. --- src/interp/g-util.boot | 15 +++++++++++++++ src/interp/i-spec2.boot | 5 +++-- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'src/interp') diff --git a/src/interp/g-util.boot b/src/interp/g-util.boot index 4c3c9801..d70a7361 100644 --- a/src/interp/g-util.boot +++ b/src/interp/g-util.boot @@ -36,6 +36,9 @@ import macros import sys_-utility namespace BOOT +module g_-util where + getTypeOfSyntax: %Form -> %Mode + ++ $interpOnly := false @@ -105,6 +108,8 @@ put(x,prop,val,e) == addBinding(x,newProplist,e) +--% Syntax manipulation + ++ Build a quasiquotation form for `x'. quasiquote x == ["[||]",x] @@ -114,6 +119,16 @@ isQuasiquote m == m is ["[||]",y] => y +getTypeOfSyntax t == + atom t => + IDENTP t => '(Identifier) + (m := getBasicMode t) and not member(m,[$EmptyMode,$NoValueMode]) => + ["Literal",m] + $Syntax + $Syntax + +--% + -- Convert an arbitrary lisp object to canonical boolean. bool: %Thing -> %Boolean bool x == diff --git a/src/interp/i-spec2.boot b/src/interp/i-spec2.boot index e78da954..f4256a06 100644 --- a/src/interp/i-spec2.boot +++ b/src/interp/i-spec2.boot @@ -809,8 +809,9 @@ evalQUOTE(op,[expr],[m]) == --% Quasiquotation up_[_|_|_] t == t isnt [op, x] => nil - putValue(op, objNewWrap(x, $Syntax)) - putModeSet(op, [$Syntax]) + mode := getTypeOfSyntax x + putValue(op, objNewWrap(x, mode)) + putModeSet(op, [mode]) --% Handler for pretend -- cgit v1.2.3