From bc5a8eb98b7a1cee6b0813a515c92a765d0cc470 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sat, 18 Aug 2007 04:12:56 +0000 Subject: * translator.boot.pamphlet (bpOutItem): Translate ConstantDefinition nodes. Update cached Lisp translation. * parser.boot.pamphlet (bpSimpleDefinitionTail): Build a ConstantDefinition Ast. Update cached Lisp translation. * ast.boot.pamphlet (ConstantDefinition): A separate Ast node for constant definitions. (bfCompDef): Don't compile ConstantDefinition here. Update cached Lisp translation. --- src/boot/translator.boot.pamphlet | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/boot/translator.boot.pamphlet') diff --git a/src/boot/translator.boot.pamphlet b/src/boot/translator.boot.pamphlet index 384fdbde..c805b20b 100644 --- a/src/boot/translator.boot.pamphlet +++ b/src/boot/translator.boot.pamphlet @@ -408,9 +408,18 @@ bpOutItem()== b is ["L%T",l,r] and IDENTP l => bpPush [shoeEVALANDFILEACTQ ["DEFPARAMETER",l,r]] case b of - Module(m) => bpPush [shoeCompileTimeEvaluation ["PROVIDE", m]] - Import(m) => bpPush [["IMPORT-MODULE", m]] - TypeAlias(t, args, rhs) => bpPush [["DEFTYPE", t, args, ["QUOTE", rhs]]] + Module(m) => + bpPush [shoeCompileTimeEvaluation ["PROVIDE", m]] + + Import(m) => + bpPush [["IMPORT-MODULE", m]] + + TypeAlias(t, args, rhs) => + bpPush [["DEFTYPE", t, args, ["QUOTE", rhs]]] + + ConstantDefinition(n, e) => + bpPush [["DEFCONSTANT", n, e]] + otherwise => b:=shoeCompTran ["LAMBDA",["x"],b] bpPush [shoeEVALANDFILEACTQ CADDR b] @@ -1272,8 +1281,7 @@ associateRequestWithFileType(Option '"compile", '"boot", (LIST 'PROVIDE |m|)))))) (|Import| (LET ((|m| (CAR |bfVar#6|))) - (|bpPush| - (LIST (LIST 'IMPORT-MODULE |m|))))) + (|bpPush| (LIST (LIST 'IMPORT-MODULE |m|))))) (|TypeAlias| (LET ((|t| (CAR |bfVar#6|)) (|args| (CADR |bfVar#6|)) @@ -1281,6 +1289,9 @@ associateRequestWithFileType(Option '"compile", '"boot", (|bpPush| (LIST (LIST 'DEFTYPE |t| |args| (LIST 'QUOTE |rhs|)))))) + (|ConstantDefinition| + (LET ((|n| (CAR |bfVar#6|)) (|e| (CADR |bfVar#6|))) + (|bpPush| (LIST (LIST 'DEFCONSTANT |n| |e|))))) (T (PROGN (SETQ |b| (|shoeCompTran| -- cgit v1.2.3