diff options
author | dos-reis <gdr@axiomatics.org> | 2008-05-08 06:12:23 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-05-08 06:12:23 +0000 |
commit | 777de75052c863d618cb03e083bad5f050f5e6f3 (patch) | |
tree | c45876162322c034b0f5883be23adfdd6a73eb41 /src/boot | |
parent | fa9902f78dd3cdcd50e25f2e902508c8777a6fa9 (diff) | |
download | open-axiom-777de75052c863d618cb03e083bad5f050f5e6f3.tar.gz |
* boot/translator.boot (bpOutItem): Handle namespace declaration.
Update all boot files to use `namespace' instead of `)package'.
* interp/: Likewise.
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/ast.boot | 5 | ||||
-rw-r--r-- | src/boot/includer.boot | 4 | ||||
-rw-r--r-- | src/boot/parser.boot | 5 | ||||
-rw-r--r-- | src/boot/pile.boot | 6 | ||||
-rw-r--r-- | src/boot/scanner.boot | 5 | ||||
-rw-r--r-- | src/boot/strap/translator.clisp | 3 | ||||
-rw-r--r-- | src/boot/tokens.boot | 5 | ||||
-rw-r--r-- | src/boot/translator.boot | 8 |
8 files changed, 21 insertions, 20 deletions
diff --git a/src/boot/ast.boot b/src/boot/ast.boot index 551c6835..e8e81c29 100644 --- a/src/boot/ast.boot +++ b/src/boot/ast.boot @@ -38,10 +38,9 @@ -- for representing Boot programs. -- -module ast import includer - -)package "BOOTTRAN" +module ast +namespace BOOTTRAN ++ True means that Boot functions should be translated to use ++ hash tables to remember values. By default, functions are diff --git a/src/boot/includer.boot b/src/boot/includer.boot index bb8da9a9..53558b27 100644 --- a/src/boot/includer.boot +++ b/src/boot/includer.boot @@ -37,10 +37,10 @@ -- This file defines the includer (or preprocessor) of Boot programs. -- -module includer import tokens +module includer +namespace BOOTTRAN -)package "BOOTTRAN" -- BOOT INCLUDER -- Line syntax is diff --git a/src/boot/parser.boot b/src/boot/parser.boot index 771fade4..b55de2bc 100644 --- a/src/boot/parser.boot +++ b/src/boot/parser.boot @@ -39,12 +39,11 @@ -- -module parser import includer import scanner import ast - -)package "BOOTTRAN" +module parser +namespace BOOTTRAN ++ true when the current function definition has its parameters diff --git a/src/boot/pile.boot b/src/boot/pile.boot index c5f16064..a95f4bbe 100644 --- a/src/boot/pile.boot +++ b/src/boot/pile.boot @@ -32,11 +32,11 @@ -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -module pile import includer import scanner - -)package "BOOTTRAN" +module pile +namespace BOOTTRAN + shoeFirstTokPosn t== shoeTokPosn CAAR t shoeLastTokPosn t== shoeTokPosn CADR t shoePileColumn t==CDR shoeTokPosn CAAR t diff --git a/src/boot/scanner.boot b/src/boot/scanner.boot index 108fc58a..90a7945f 100644 --- a/src/boot/scanner.boot +++ b/src/boot/scanner.boot @@ -33,11 +33,10 @@ -- -module scanner import tokens import includer - -)package "BOOTTRAN" +module scanner +namespace BOOTTRAN -- converts X to double-float. double x == diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index e3bab9c4..5f88927f 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -916,6 +916,9 @@ (LET ((|n| (CAR |bfVar#35|)) (|e| (CADR |bfVar#35|))) (|bpPush| (LIST (LIST 'DEFCONSTANT |n| |e|))))) + (|namespace| + (LET ((|n| (CAR |bfVar#35|))) + (|bpPush| (LIST (LIST 'IN-PACKAGE (STRING |n|)))))) (T (|bpPush| (LIST (|translateToplevelExpression| |b|)))))))))))) (DEFUN |shoeAddbootIfNec| (|s|) (|shoeAddStringIfNec| ".boot" |s|)) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 5c8382a3..9502190d 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -32,10 +32,9 @@ -- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- -module tokens import initial_-env - -)package "BOOTTRAN" +module tokens +namespace BOOTTRAN ++ Table of Boot keywords and their token name. shoeKeyWords == [ _ diff --git a/src/boot/translator.boot b/src/boot/translator.boot index 53cfdb3b..02d809ba 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -33,14 +33,13 @@ -- -module translator import includer import scanner import pile import parser import ast - -)package "BOOTTRAN" +module translator +namespace BOOTTRAN ++ If non nil, holds the name of the current module being translated. $currentModuleName := nil @@ -497,6 +496,9 @@ bpOutItem()== ConstantDefinition(n, e) => bpPush [["DEFCONSTANT", n, e]] + namespace(n) => + bpPush [["IN-PACKAGE",STRING n]] + otherwise => bpPush [translateToplevelExpression b] |