From c6179efd4a1f1770d4d31415582eabebbe2ab6a0 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 19 Apr 2011 07:20:55 +0000 Subject: * boot/ast.boot (%Module): Now take three arguments. * boot/parser.boot (bpModuleInterface): Rename from bpExports. (bpModuleExports): New. (bpModule): Now allow specification of exported names. --- src/boot/strap/parser.clisp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src/boot/strap/parser.clisp') diff --git a/src/boot/strap/parser.clisp b/src/boot/strap/parser.clisp index 7b978080..89cb3dee 100644 --- a/src/boot/strap/parser.clisp +++ b/src/boot/strap/parser.clisp @@ -461,19 +461,26 @@ (DEFUN |bpExportItemList| () (|bpListAndRecover| #'|bpExportItem|)) -(DEFUN |bpExports| () (|bpPileBracketed| #'|bpExportItemList|)) +(DEFUN |bpModuleInterface| () + (COND + ((|bpEqKey| 'WHERE) + (OR (|bpPileBracketed| #'|bpExportItemList|) + (AND (|bpExportItem|) (|bpPush| (LIST (|bpPop1|)))) + (|bpTrap|))) + (T (|bpPush| NIL)))) + +(DEFUN |bpModuleExports| () + (COND + ((|bpParenthesized| #'|bpIdList|) + (|bpPush| (|bfUntuple| (|bpPop1|)))) + (T (|bpPush| NIL)))) (DEFUN |bpModule| () (COND - ((|bpEqKey| 'MODULE) - (IDENTITY - (PROGN - (OR (|bpName|) (|bpTrap|)) - (COND - ((|bpEqKey| 'WHERE) - (AND (|bpExports|) - (|bpPush| (|%Module| (|bpPop2|) (|bpPop1|))))) - (T (|bpPush| (|%Module| (|bpPop1|) NIL))))))))) + ((|bpEqKey| 'MODULE) (OR (|bpName|) (|bpTrap|)) (|bpModuleExports|) + (|bpModuleInterface|) + (|bpPush| (|%Module| (|bpPop3|) (|bpPop2|) (|bpPop1|)))) + (T NIL))) (DEFUN |bpImport| () (PROG (|a|) -- cgit v1.2.3