diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/ast.boot | 13 | ||||
-rw-r--r-- | src/boot/strap/ast.clisp | 11 | ||||
-rw-r--r-- | src/boot/translator.boot | 2 | ||||
-rw-r--r-- | src/boot/utility.boot | 7 |
4 files changed, 17 insertions, 16 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 3cc190ae..670ad2da 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -856,7 +856,7 @@ bfDef1 [op,args,body] == argl := bfTupleP args => rest args [args] - [quotes,control,arglp,body]:=bfInsertLet (argl,body) + [quotes,control,arglp,body] := bfInsertLet (argl,body) quotes => shoeLAM(op,arglp,control,body) [[op,["LAMBDA",arglp,body]]] @@ -955,16 +955,13 @@ shoePROG(v,b)== [["PROG",v,:blist,["RETURN", blast]]] shoeFluids x== - x = nil => nil - symbol? x and bfBeginsDollar x => [x] - atom x => nil - x is ["QUOTE",:.] => nil + ident? x and bfBeginsDollar x => [x] + atomic? x => nil [:shoeFluids first x,:shoeFluids rest x] shoeATOMs x == - x = nil => nil - symbol? x => [x] - atom x => nil + ident? x => [x] + atomic? x => nil [:shoeATOMs first x,:shoeATOMs rest x] ++ Return true if `x' is an identifier name that designates a diff --git a/src/boot/strap/ast.clisp b/src/boot/strap/ast.clisp index 10dea59c..213414cd 100644 --- a/src/boot/strap/ast.clisp +++ b/src/boot/strap/ast.clisp @@ -1791,17 +1791,14 @@ (DEFUN |shoeFluids| (|x|) (COND - ((NULL |x|) NIL) - ((AND (SYMBOLP |x|) (|bfBeginsDollar| |x|)) (LIST |x|)) - ((ATOM |x|) NIL) - ((AND (CONSP |x|) (EQ (CAR |x|) 'QUOTE)) NIL) + ((AND (|ident?| |x|) (|bfBeginsDollar| |x|)) (LIST |x|)) + ((|atomic?| |x|) NIL) (T (|append| (|shoeFluids| (CAR |x|)) (|shoeFluids| (CDR |x|)))))) (DEFUN |shoeATOMs| (|x|) (COND - ((NULL |x|) NIL) - ((SYMBOLP |x|) (LIST |x|)) - ((ATOM |x|) NIL) + ((|ident?| |x|) (LIST |x|)) + ((|atomic?| |x|) NIL) (T (|append| (|shoeATOMs| (CAR |x|)) (|shoeATOMs| (CDR |x|)))))) (DEFUN |isDynamicVariable| (|x|) diff --git a/src/boot/translator.boot b/src/boot/translator.boot index bc445495..c939e52b 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -425,7 +425,7 @@ translateToplevel(b,export?) == b is ["TUPLE",:xs] => coreError '"invalid AST" case b of %Signature(op,t) => [genDeclaration(op,t)] - %Definition(op,args,body) => rest bfDef(op,args,body) + %Definition(op,args,body) => bfDef(op,args,body).args %Module(m,ns,ds) => $currentModuleName := m diff --git a/src/boot/utility.boot b/src/boot/utility.boot index 0eca52d2..a0444d0f 100644 --- a/src/boot/utility.boot +++ b/src/boot/utility.boot @@ -30,6 +30,13 @@ -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- +--% +--% Definitions in this file provide runtime support for the Boot +--% language. As such, some of the definitions (e.g. reverse, append, etc) +--% use `unusual' style. These functions are used in code generated +--% by the Boot translator. Others are handy library functions. +--% + import initial_-env namespace BOOTTRAN |