aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-09-02 05:14:28 +0000
committerdos-reis <gdr@axiomatics.org>2008-09-02 05:14:28 +0000
commit7948079d6e0b85320ec936e5405112569058115e (patch)
tree6df96769e9a33d59203421226f3151671fe75997 /src/interp
parentc43c86d54ef9be4c3c11d45a1d55487d3cf45ac8 (diff)
downloadopen-axiom-7948079d6e0b85320ec936e5405112569058115e.tar.gz
* 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.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/g-util.boot15
-rw-r--r--src/interp/i-spec2.boot5
2 files changed, 18 insertions, 2 deletions
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