diff options
author | dos-reis <gdr@axiomatics.org> | 2007-08-18 04:12:56 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2007-08-18 04:12:56 +0000 |
commit | bc5a8eb98b7a1cee6b0813a515c92a765d0cc470 (patch) | |
tree | 4b606e6204c091d048a43b47cf1bf6d69cc99780 /src/boot/translator.boot.pamphlet | |
parent | 61cd82ec6cae982b09c90166f65bc78bf9655dff (diff) | |
download | open-axiom-bc5a8eb98b7a1cee6b0813a515c92a765d0cc470.tar.gz |
* 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.
Diffstat (limited to 'src/boot/translator.boot.pamphlet')
-rw-r--r-- | src/boot/translator.boot.pamphlet | 21 |
1 files changed, 16 insertions, 5 deletions
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| |