diff options
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/includer.boot | 86 | ||||
-rw-r--r-- | src/boot/scanner.boot | 5 | ||||
-rw-r--r-- | src/boot/strap/includer.clisp | 112 | ||||
-rw-r--r-- | src/boot/strap/scanner.clisp | 11 | ||||
-rw-r--r-- | src/boot/strap/tokens.clisp | 1 | ||||
-rw-r--r-- | src/boot/strap/translator.clisp | 88 | ||||
-rw-r--r-- | src/boot/tokens.boot | 1 | ||||
-rw-r--r-- | src/boot/translator.boot | 39 |
8 files changed, 33 insertions, 310 deletions
diff --git a/src/boot/includer.boot b/src/boot/includer.boot index 62cc6456..e74542eb 100644 --- a/src/boot/includer.boot +++ b/src/boot/includer.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2010, Gabriel Dos Reis. +-- Copyright (C) 2007-2011, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -53,14 +53,7 @@ module includer -- )eval line | evaluates the boot line -- nothing included -- )line line | line is reproduced as is in lisp output --- )lisp line | line is read by lisp READ --- )package line | produces (IN-PACKAGE line) in lisp --- output --- )include filename | includes the file as boot code --- )includelisp filename | includes the file as lisp code --- read by lisp READ --- )includelines filename | includes the file as is --- in lisp output +-- )lisp line line is read by lisp READ -- -- If ::= )if SimpleLine* ElseLines )endif -- @@ -140,38 +133,14 @@ lineString p == lineCharacter p == rest p -shoePackageStartsAt (lines,sz,name,stream)== - bStreamNull stream => [[],['nullstream]] - a := CAAR stream - #a >= 8 and subString(a,0,8)='")package" => - shoePackageStartsAt([CAAR stream,:lines],sz,name,rest stream) - #a < sz => - shoePackageStartsAt(lines, sz,name,rest stream) - subString(a,0,sz)=name and (#a>sz and not shoeIdChar(a.sz)) => - [lines,stream] - shoePackageStartsAt(lines,sz,name,rest stream) - -shoeFindLines(fn,name,a)== - a = nil => - shoeNotFound fn - [] - [lines,b]:=shoePackageStartsAt([],#name,name, shoeInclude - bAddLineNumber(bRgen a,bIgen 0)) - b:=shoeTransform2 b - bStreamNull b => - shoeConsole strconc (name,'" not found in ",fn) - [] - lines = nil => shoeConsole '")package not found" - append(reverse lines,first b) - -- Lazy inclusion support. -$bStreamNil:=["nullstream"] +$bStreamNil == ["nullstream"] -bStreamNull x== +bStreamNull x == x = nil or x is ["nullstream",:.] => true - while x is ["nonnullstream",:.] repeat - st:=apply(second x,CDDR x) + while x is ["nonnullstream",op,:args] repeat + st := apply(op,args) x.first := first st x.rest := rest st x is ["nullstream",:.] @@ -180,20 +149,10 @@ bMap(f,x) == bDelay(function bMap1, [f,x]) bMap1(:z)== - [f,x]:=z - if bStreamNull x - then $bStreamNil - else [FUNCALL(f,first x),:bMap(f,rest x)] - -shoeFileMap(f, fn)== - a:=shoeInputFile fn - a = nil => - shoeConsole strconc(fn,'" NOT FOUND") - $bStreamNil - shoeConsole strconc('"READING ",fn) - shoeInclude bAddLineNumber(bMap(f,bRgen a),bIgen 0) + [f,x] := z + bStreamNull x => $bStreamNil + [apply(f,[first x]),:bMap(f,rest x)] - bDelay(f,x) == ["nonnullstream",:[f,:x]] @@ -239,22 +198,12 @@ bAddLineNumber1(:f)== [[first f1,:first f2],:bAddLineNumber(rest f1,rest f2)] - -shoeFileInput fn == - shoeFileMap(function IDENTITY,fn) - shoePrefixLisp x == strconc('")lisp",x) -shoeLispFileInput fn== - shoeFileMap(function shoePrefixLisp,fn) - shoePrefixLine x== strconc('")line",x) -shoeLineFileInput fn== - shoeFileMap(function shoePrefixLine,fn) - shoePrefix?(prefix,whole) == #prefix > #whole => false good:=true @@ -269,18 +218,13 @@ shoePlainLine?(s) == shoeSay? s == shoePrefix?('")say", s) shoeEval? s == shoePrefix?('")eval", s) -shoeInclude? s == shoePrefix?('")include", s) shoeFin? s == shoePrefix?('")fin", s) shoeIf? s == shoePrefix?('")if", s) shoeEndIf? s == shoePrefix?('")endif", s) shoeElse? s == shoePrefix?('")else", s) shoeElseIf? s == shoePrefix?('")elseif", s) -shoePackage? s == shoePrefix?('")package", s) shoeLisp? s == shoePrefix?('")lisp", s) -shoeIncludeLisp? s == shoePrefix?('")includelisp" ,s) shoeLine? s == shoePrefix?('")line", s) -shoeIncludeLines? s == shoePrefix?('")includelines",s) -shoeIncludeFunction? s == shoePrefix?('")includefunction",s) shoeBiteOff x== n:=STRPOSL('" ",x,0,true) @@ -303,10 +247,6 @@ shoeFnFileName x== c = nil => [first a,'""] [first a, c] -shoeFunctionFileInput [fun,fn]== - shoeOpenInputFile (a,fn, - shoeInclude bAddLineNumber( shoeFindLines(fn,fun,a),bIgen 0)) - shoeInclude s == bDelay(function shoeInclude1,[s]) @@ -322,15 +262,7 @@ shoeSimpleLine(h) == string :=first h shoePlainLine? string=> [h] command:=shoeLisp? string => [h] - command:=shoeIncludeLisp? string => - shoeLispFileInput shoeFileName command - command:=shoeIncludeFunction? string => - shoeFunctionFileInput shoeFnFileName command command:=shoeLine? string => [h] - command:=shoeIncludeLines? string => - shoeLineFileInput shoeFileName command - command:=shoeInclude? string => shoeFileInput shoeFileName command - command:=shoePackage? string => [h] command:=shoeSay? string => shoeConsole command nil diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot index 8066ee94..4522e2b1 100644 --- a/src/boot/scanner.boot +++ b/src/boot/scanner.boot @@ -112,11 +112,6 @@ shoeLineToks(s)== ($ln,$linepos,shoeLeafLine command,0) [[dq],:$r] command:=shoeLisp? $ln=> shoeLispToken($r,command) - command:=shoePackage? $ln=> - a := strconc('"(IN-PACKAGE ",command,'")") - dq:=dqUnit shoeConstructToken - ($ln,$linepos,shoeLeafLisp a,0) - [[dq],:$r] shoeLineToks $r toks:=[] while $n<$sz repeat toks:=dqAppend(toks,shoeToken()) diff --git a/src/boot/strap/includer.clisp b/src/boot/strap/includer.clisp index 323a23a9..7d47a96c 100644 --- a/src/boot/strap/includer.clisp +++ b/src/boot/strap/includer.clisp @@ -82,59 +82,27 @@ (DEFUN |lineCharacter| (|p|) (CDR |p|)) -(DEFUN |shoePackageStartsAt| (|lines| |sz| |name| |stream|) - (PROG (|a|) - (RETURN - (COND - ((|bStreamNull| |stream|) (LIST NIL (LIST '|nullstream|))) - (T (SETQ |a| (CAAR |stream|)) - (COND - ((AND (NOT (< (LENGTH |a|) 8)) - (STRING= (|subString| |a| 0 8) ")package")) - (|shoePackageStartsAt| (CONS (CAAR |stream|) |lines|) - |sz| |name| (CDR |stream|))) - ((< (LENGTH |a|) |sz|) - (|shoePackageStartsAt| |lines| |sz| |name| - (CDR |stream|))) - ((AND (STRING= (|subString| |a| 0 |sz|) |name|) - (< |sz| (LENGTH |a|)) - (NOT (|shoeIdChar| (ELT |a| |sz|)))) - (LIST |lines| |stream|)) - (T (|shoePackageStartsAt| |lines| |sz| |name| - (CDR |stream|))))))))) - -(DEFUN |shoeFindLines| (|fn| |name| |a|) - (PROG (|b| |lines| |LETTMP#1|) - (RETURN - (COND - ((NULL |a|) (|shoeNotFound| |fn|) NIL) - (T (SETQ |LETTMP#1| - (|shoePackageStartsAt| NIL (LENGTH |name|) |name| - (|shoeInclude| - (|bAddLineNumber| (|bRgen| |a|) (|bIgen| 0))))) - (SETQ |lines| (CAR |LETTMP#1|)) (SETQ |b| (CADR |LETTMP#1|)) - (SETQ |b| (|shoeTransform2| |b|)) - (COND - ((|bStreamNull| |b|) - (|shoeConsole| (CONCAT |name| " not found in " |fn|)) - NIL) - ((NULL |lines|) (|shoeConsole| ")package not found")) - (T (APPEND (REVERSE |lines|) (CAR |b|))))))))) - -(DEFPARAMETER |$bStreamNil| (LIST '|nullstream|)) +(DEFCONSTANT |$bStreamNil| (LIST '|nullstream|)) (DEFUN |bStreamNull| (|x|) - (PROG (|st|) + (PROG (|st| |args| |op| |ISTMP#1|) (RETURN (COND ((OR (NULL |x|) (AND (CONSP |x|) (EQ (CAR |x|) '|nullstream|))) T) (T (LOOP (COND - ((NOT (AND (CONSP |x|) (EQ (CAR |x|) '|nonnullstream|))) + ((NOT (AND (CONSP |x|) (EQ (CAR |x|) '|nonnullstream|) + (PROGN + (SETQ |ISTMP#1| (CDR |x|)) + (AND (CONSP |ISTMP#1|) + (PROGN + (SETQ |op| (CAR |ISTMP#1|)) + (SETQ |args| (CDR |ISTMP#1|)) + T))))) (RETURN NIL)) (T (PROGN - (SETQ |st| (APPLY (CADR |x|) (CDDR |x|))) + (SETQ |st| (APPLY |op| |args|)) (RPLACA |x| (CAR |st|)) (RPLACD |x| (CDR |st|)))))) (AND (CONSP |x|) (EQ (CAR |x|) '|nullstream|))))))) @@ -143,28 +111,13 @@ (DEFUN |bMap1| (&REST |z|) (PROG (|x| |f|) - (DECLARE (SPECIAL |$bStreamNil|)) (RETURN (PROGN (SETQ |f| (CAR |z|)) (SETQ |x| (CADR |z|)) (COND ((|bStreamNull| |x|) |$bStreamNil|) - (T (CONS (FUNCALL |f| (CAR |x|)) (|bMap| |f| (CDR |x|))))))))) - -(DEFUN |shoeFileMap| (|f| |fn|) - (PROG (|a|) - (DECLARE (SPECIAL |$bStreamNil|)) - (RETURN - (PROGN - (SETQ |a| (|shoeInputFile| |fn|)) - (COND - ((NULL |a|) (|shoeConsole| (CONCAT |fn| " NOT FOUND")) - |$bStreamNil|) - (T (|shoeConsole| (CONCAT "READING " |fn|)) - (|shoeInclude| - (|bAddLineNumber| (|bMap| |f| (|bRgen| |a|)) - (|bIgen| 0))))))))) + (T (CONS (APPLY |f| (LIST (CAR |x|))) (|bMap| |f| (CDR |x|))))))))) (DEFUN |bDelay| (|f| |x|) (CONS '|nonnullstream| (CONS |f| |x|))) @@ -219,18 +172,10 @@ (T (CONS (CONS (CAR |f1|) (CAR |f2|)) (|bAddLineNumber| (CDR |f1|) (CDR |f2|))))))))) -(DEFUN |shoeFileInput| (|fn|) (|shoeFileMap| #'IDENTITY |fn|)) - (DEFUN |shoePrefixLisp| (|x|) (CONCAT ")lisp" |x|)) -(DEFUN |shoeLispFileInput| (|fn|) - (|shoeFileMap| #'|shoePrefixLisp| |fn|)) - (DEFUN |shoePrefixLine| (|x|) (CONCAT ")line" |x|)) -(DEFUN |shoeLineFileInput| (|fn|) - (|shoeFileMap| #'|shoePrefixLine| |fn|)) - (DEFUN |shoePrefix?| (|prefix| |whole|) (PROG (|good|) (RETURN @@ -259,8 +204,6 @@ (DEFUN |shoeEval?| (|s|) (|shoePrefix?| ")eval" |s|)) -(DEFUN |shoeInclude?| (|s|) (|shoePrefix?| ")include" |s|)) - (DEFUN |shoeFin?| (|s|) (|shoePrefix?| ")fin" |s|)) (DEFUN |shoeIf?| (|s|) (|shoePrefix?| ")if" |s|)) @@ -271,19 +214,10 @@ (DEFUN |shoeElseIf?| (|s|) (|shoePrefix?| ")elseif" |s|)) -(DEFUN |shoePackage?| (|s|) (|shoePrefix?| ")package" |s|)) - (DEFUN |shoeLisp?| (|s|) (|shoePrefix?| ")lisp" |s|)) -(DEFUN |shoeIncludeLisp?| (|s|) (|shoePrefix?| ")includelisp" |s|)) - (DEFUN |shoeLine?| (|s|) (|shoePrefix?| ")line" |s|)) -(DEFUN |shoeIncludeLines?| (|s|) (|shoePrefix?| ")includelines" |s|)) - -(DEFUN |shoeIncludeFunction?| (|s|) - (|shoePrefix?| ")includefunction" |s|)) - (DEFUN |shoeBiteOff| (|x|) (PROG (|n1| |n|) (RETURN @@ -321,22 +255,10 @@ ((NULL |c|) (LIST (CAR |a|) "")) (T (LIST (CAR |a|) |c|))))))))) -(DEFUN |shoeFunctionFileInput| (|bfVar#2|) - (PROG (|fn| |fun|) - (RETURN - (PROGN - (SETQ |fun| (CAR |bfVar#2|)) - (SETQ |fn| (CADR |bfVar#2|)) - (|shoeOpenInputFile| |a| |fn| - (|shoeInclude| - (|bAddLineNumber| (|shoeFindLines| |fn| |fun| |a|) - (|bIgen| 0)))))))) - (DEFUN |shoeInclude| (|s|) (|bDelay| #'|shoeInclude1| (LIST |s|))) (DEFUN |shoeInclude1| (|s|) (PROG (|command| |string| |t| |h|) - (DECLARE (SPECIAL |$bStreamNil|)) (RETURN (COND ((|bStreamNull| |s|) |s|) @@ -356,16 +278,7 @@ (COND ((|shoePlainLine?| |string|) (LIST |h|)) ((SETQ |command| (|shoeLisp?| |string|)) (LIST |h|)) - ((SETQ |command| (|shoeIncludeLisp?| |string|)) - (|shoeLispFileInput| (|shoeFileName| |command|))) - ((SETQ |command| (|shoeIncludeFunction?| |string|)) - (|shoeFunctionFileInput| (|shoeFnFileName| |command|))) ((SETQ |command| (|shoeLine?| |string|)) (LIST |h|)) - ((SETQ |command| (|shoeIncludeLines?| |string|)) - (|shoeLineFileInput| (|shoeFileName| |command|))) - ((SETQ |command| (|shoeInclude?| |string|)) - (|shoeFileInput| (|shoeFileName| |command|))) - ((SETQ |command| (|shoePackage?| |string|)) (LIST |h|)) ((SETQ |command| (|shoeSay?| |string|)) (|shoeConsole| |command|) NIL) ((SETQ |command| (|shoeEval?| |string|)) (STTOMC |command|) @@ -457,7 +370,6 @@ (|shoeConsole| "LINE IGNORED"))) (DEFUN |bPremStreamNil| (|h|) - (DECLARE (SPECIAL |$bStreamNil|)) (PROGN (|shoeConsole| (CONCAT "UNEXPECTED )fin IN LINE " (WRITE-TO-STRING (CDR |h|)))) diff --git a/src/boot/strap/scanner.clisp b/src/boot/strap/scanner.clisp index 2df8e320..36c8ef05 100644 --- a/src/boot/strap/scanner.clisp +++ b/src/boot/strap/scanner.clisp @@ -60,8 +60,8 @@ (T T))))))) (DEFUN |shoeLineToks| (|s|) - (PROG (|$linepos| |$floatok| |$sz| |$n| |$ln| |$r| |$f| |toks| |a| - |dq| |command|) + (PROG (|$linepos| |$floatok| |$sz| |$n| |$ln| |$r| |$f| |toks| |dq| + |command|) (DECLARE (SPECIAL |$floatok| |$f| |$sz| |$linepos| |$ln| |$r| |$n|)) (RETURN (PROGN @@ -85,13 +85,6 @@ (CONS (LIST |dq|) |$r|)) ((SETQ |command| (|shoeLisp?| |$ln|)) (|shoeLispToken| |$r| |command|)) - ((SETQ |command| (|shoePackage?| |$ln|)) - (SETQ |a| (CONCAT "(IN-PACKAGE " |command| ")")) - (SETQ |dq| - (|dqUnit| - (|shoeConstructToken| |$ln| |$linepos| - (|shoeLeafLisp| |a|) 0))) - (CONS (LIST |dq|) |$r|)) (T (|shoeLineToks| |$r|)))) (T (SETQ |toks| NIL) (LOOP diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index b33cbc0b..80875ca7 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -203,6 +203,7 @@ (LIST '|apply| 'APPLY) (LIST '|arrayRef| 'AREF) (LIST '|atom| 'ATOM) (LIST '|bitmask| 'SBIT) (LIST '|canonicalFilename| 'PROBE-FILE) + (LIST '|charByName| 'NAME-CHAR) (LIST '|charString| 'STRING) (LIST '|char?| 'CHARACTERP) (LIST '|codePoint| 'CHAR-CODE) (LIST '|cons?| 'CONSP) diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index 5800bc33..0968b9ea 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -1069,79 +1069,24 @@ |stream| |a|)))) (SETQ |bfVar#23| (CDR |bfVar#23|)))))))) -(DEFUN FBO (|name| |fn|) (|shoeGeneralFC| #'BO |name| |fn|)) - -(DEFUN FEV (|name| |fn|) - (|shoeGeneralFC| #'EVAL-BOOT-FILE |name| |fn|)) - -(DEFUN |shoeGeneralFC| (|f| |name| |fn|) - (PROG (|filename| |a| |infn|) - (DECLARE (SPECIAL |$GenVarCounter| |$bfClamming|)) - (RETURN - (PROGN - (SETQ |$bfClamming| NIL) - (SETQ |$GenVarCounter| 0) - (SETQ |infn| (|shoeAddbootIfNec| |fn|)) - (SETQ |a| - (|shoeOpenInputFile| |a| |infn| - (|shoeFindName2| |fn| |name| |a|))) - (SETQ |filename| - (COND - ((< 8 (LENGTH |name|)) (|subString| |name| 0 8)) - (T |name|))) - (COND (|a| (FUNCALL |f| (CONCAT "/tmp/" |filename|))) (T NIL)))))) - -(DEFUN |shoeFindName2| (|fn| |name| |a|) - (PROG (|filename| |lines|) - (RETURN - (PROGN - (SETQ |lines| (|shoeFindLines| |fn| |name| |a|)) - (COND - (|lines| (SETQ |filename| - (COND - ((< 8 (LENGTH |name|)) - (|subString| |name| 0 8)) - (T |name|))) - (SETQ |filename| - (CONCAT "/tmp/" |filename| ".boot")) - (|shoeOpenOutputFile| |stream| |filename| - (LET ((|bfVar#24| |lines|) (|line| NIL)) - (LOOP - (COND - ((OR (ATOM |bfVar#24|) - (PROGN - (SETQ |line| (CAR |bfVar#24|)) - NIL)) - (RETURN NIL)) - (T (|shoeFileLine| |line| |stream|))) - (SETQ |bfVar#24| (CDR |bfVar#24|))))) - T) - (T NIL)))))) - -(DEFUN |shoeTransform2| (|str|) - (|bNext| #'|shoeItem| - (|streamTake| 1 - (|bNext| #'|shoePileInsert| - (|bNext| #'|shoeLineToks| |str|))))) - (DEFUN |shoeItem| (|str|) (PROG (|dq|) (RETURN (PROGN (SETQ |dq| (CAR |str|)) - (CONS (LIST (LET ((|bfVar#26| NIL) - (|bfVar#25| (|shoeDQlines| |dq|)) + (CONS (LIST (LET ((|bfVar#25| NIL) + (|bfVar#24| (|shoeDQlines| |dq|)) (|line| NIL)) (LOOP (COND - ((OR (ATOM |bfVar#25|) + ((OR (ATOM |bfVar#24|) (PROGN - (SETQ |line| (CAR |bfVar#25|)) + (SETQ |line| (CAR |bfVar#24|)) NIL)) - (RETURN (NREVERSE |bfVar#26|))) - (T (SETQ |bfVar#26| - (CONS (CAR |line|) |bfVar#26|)))) - (SETQ |bfVar#25| (CDR |bfVar#25|))))) + (RETURN (NREVERSE |bfVar#25|))) + (T (SETQ |bfVar#25| + (CONS (CAR |line|) |bfVar#25|)))) + (SETQ |bfVar#24| (CDR |bfVar#24|))))) (CDR |str|)))))) (DEFUN |stripm| (|x| |pk| |bt|) @@ -1177,23 +1122,6 @@ (COMPILE |name| (CONS 'LAMBDA (CONS |bv| |body|)))) (T (EVAL |fn|))))))) -(DEFUN FC (|name| |fn|) - (PROG (|infn|) - (DECLARE (SPECIAL |$GenVarCounter|)) - (RETURN - (PROGN - (SETQ |$GenVarCounter| 0) - (SETQ |infn| (|shoeAddbootIfNec| |fn|)) - (|shoeOpenInputFile| |a| |infn| - (|shoeFindName| |fn| |name| |a|)))))) - -(DEFUN |shoeFindName| (|fn| |name| |a|) - (PROG (|lines|) - (RETURN - (PROGN - (SETQ |lines| (|shoeFindLines| |fn| |name| |a|)) - (|shoePCompileTrees| (|shoeTransformString| |lines|)))))) - (DEFUN |shoePCompileTrees| (|s|) (LOOP (COND diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index af6f83a8..671439c5 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -249,6 +249,7 @@ for i in [ _ ["atom", "ATOM"] , _ ["bitmask", "SBIT"] , _ ["canonicalFilename", "PROBE-FILE"], _ + ["charByName", "NAME-CHAR"] , _ ["charString", "STRING"] , _ ["char?", "CHARACTERP"] , _ ["codePoint", "CHAR-CODE"], _ diff --git a/src/boot/translator.boot b/src/boot/translator.boot index b071fd0a..4b803b0c 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -620,36 +620,6 @@ shoeXReport stream== a := strconc(PNAME i,'" is used in ") bootOutLines( SSORT GETHASH(i,$bootUsed),stream,a) -FBO (name,fn)== - shoeGeneralFC(function BO,name,fn) - -FEV(name,fn)== - shoeGeneralFC(function EVAL_-BOOT_-FILE,name,fn) - -shoeGeneralFC(f,name,fn)== - $bfClamming :=false - $GenVarCounter := 0 - infn:=shoeAddbootIfNec fn - a:= shoeOpenInputFile(a,infn,shoeFindName2(fn,name, a)) - filename:= if # name > 8 then subString(name,0,8) else name - a => FUNCALL(f, strconc('"/tmp/",filename)) - nil - -shoeFindName2(fn,name,a)== - lines:=shoeFindLines(fn,name,a) - lines => - filename:= if # name > 8 then subString(name,0,8) else name - filename := strconc('"/tmp/",filename,'".boot") - shoeOpenOutputFile(stream, filename, - for line in lines repeat shoeFileLine (line,stream)) - true - false - -shoeTransform2 str== - bNext(function shoeItem, - streamTake(1, bNext(function shoePileInsert, - bNext(function shoeLineToks, str)))) - shoeItem (str)== dq:=first str [[[first line for line in shoeDQlines dq]],:rest str] @@ -668,15 +638,6 @@ shoePCompile fn== COMPILE (name,['LAMBDA,bv,:body]) EVAL fn -FC(name,fn)== - $GenVarCounter := 0 - infn:=shoeAddbootIfNec fn - shoeOpenInputFile(a,infn,shoeFindName(fn,name, a)) - -shoeFindName(fn,name,a)== - lines:=shoeFindLines(fn,name,a) - shoePCompileTrees shoeTransformString lines - shoePCompileTrees s== while not bStreamNull s repeat REALLYPRETTYPRINT shoePCompile first s |