From 9396ac962517465319521fb9affdd456791826d5 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 3 May 2011 07:51:43 +0000 Subject: more cleanup --- src/boot/initial-env.lisp | 13 +------------ src/boot/strap/tokens.clisp | 5 +++++ src/boot/strap/translator.clisp | 3 ++- src/boot/tokens.boot | 5 ++++- src/boot/translator.boot | 3 ++- 5 files changed, 14 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/boot/initial-env.lisp b/src/boot/initial-env.lisp index b9a76109..40ca50cc 100644 --- a/src/boot/initial-env.lisp +++ b/src/boot/initial-env.lisp @@ -46,11 +46,7 @@ (:use "AxiomCore") #+:common-lisp (:use "COMMON-LISP") #-:common-lisp (:use "LISP") - (:export "loadNativeModule" - "loadSystemRuntimeCore" - "$InteractiveMode" - "string2BootTree" - "genImportDeclaration")) + ) (in-package "BOOTTRAN") @@ -63,17 +59,10 @@ #+:ieee-floating-point (defparameter $ieee t) #-:ieee-floating-point (defparameter $ieee nil) -;; when true indicate that that the Boot translator -;; is called interactively. -(defparameter |$InteractiveMode| nil) - (defvar *lisp-bin-filetype* "o") (defvar *lisp-source-filetype* "lisp") -(defun |shoeInputFile| (filespec ) - (open filespec :direction :input :if-does-not-exist nil)) - (defmacro |shoeOpenInputFile| (stream fn prog) `(with-open-file (,stream ,fn :direction :input diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index f17b0d63..0207ed51 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -5,6 +5,11 @@ (PROVIDE "tokens") +(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) + (EXPORT '|$InteractiveMode|)) + +(DEFPARAMETER |$InteractiveMode| NIL) + (DEFUN |char| (|x|) (SCHAR (SYMBOL-NAME |x|) 0)) (DEFUN |shoeStartsId| (|x|) diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index a5a24e72..42a0740f 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -14,7 +14,8 @@ (PROVIDE "translator") (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) - (EXPORT '|evalBootFile|)) + (EXPORT '(|evalBootFile| |loadNativeModule| |loadSystemRuntimeCore| + |string2BootTree| |genImportDeclaration|))) (DEFPARAMETER |$currentModuleName| NIL) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 9c1f3d43..0b4946d5 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -34,7 +34,10 @@ import utility namespace BOOTTRAN -module tokens +module tokens ($InteractiveMode) + +++ If true, means the system is in interactive mode. +$InteractiveMode := false ++ converts `x', a 1-length symbol, to a character. char x == diff --git a/src/boot/translator.boot b/src/boot/translator.boot index a90079a5..5dd5a8dd 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -39,7 +39,8 @@ import pile import parser import ast namespace BOOTTRAN -module translator (evalBootFile) +module translator (evalBootFile, loadNativeModule, loadSystemRuntimeCore, + string2BootTree, genImportDeclaration) ++ If non nil, holds the name of the current module being translated. $currentModuleName := nil -- cgit v1.2.3