diff options
author | dos-reis <gdr@axiomatics.org> | 2010-12-10 09:47:27 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2010-12-10 09:47:27 +0000 |
commit | 93f026d1c803148e80bb23756ee656bf7ee19a8d (patch) | |
tree | fc355007a4ec227405059068052f1c7eb3bf33ac | |
parent | 7730f8fafe5dea4ab3ba8c4659a4d295689e1818 (diff) | |
download | open-axiom-93f026d1c803148e80bb23756ee656bf7ee19a8d.tar.gz |
Unify and ECHO-META under
-rw-r--r-- | src/interp/bootlex.lisp | 3 | ||||
-rw-r--r-- | src/interp/debug.lisp | 6 | ||||
-rw-r--r-- | src/interp/int-top.boot | 4 | ||||
-rw-r--r-- | src/interp/metalex.lisp | 3 | ||||
-rw-r--r-- | src/interp/parsing.lisp | 7 | ||||
-rw-r--r-- | src/interp/patches.lisp | 16 | ||||
-rw-r--r-- | src/interp/preparse.lisp | 4 | ||||
-rw-r--r-- | src/interp/sys-driver.boot | 3 | ||||
-rw-r--r-- | src/interp/sys-globals.boot | 5 |
9 files changed, 20 insertions, 31 deletions
diff --git a/src/interp/bootlex.lisp b/src/interp/bootlex.lisp index e32e375b..6c64abca 100644 --- a/src/interp/bootlex.lisp +++ b/src/interp/bootlex.lisp @@ -84,7 +84,6 @@ (*spad-input-file* nil) (*spad-output-file* nil) &aux - ;; (Echo-Meta *spad-input-file*) ;; (*comp370-apply* (function print-and-eval-defun)) (*comp370-apply* (function print-defun)) (*fileactq-apply* (function print-defun)) @@ -95,7 +94,7 @@ (File-Closed NIL) (/editfile *spad-input-file*) in-stream out-stream) - (declare (special echo-meta /editfile *comp370-apply* *EOF* + (declare (special |$Echo| /editfile *comp370-apply* *EOF* File-Closed Xcape)) (setq |$InteractiveMode| nil) ;; only rebind |$InteractiveFrame| if compiling diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp index 9e61867c..0f195922 100644 --- a/src/interp/debug.lisp +++ b/src/interp/debug.lisp @@ -129,13 +129,13 @@ (DEFUN /D-2 (FN INFILE OUTPUTSTREAM OP EDITFLAG TRACEFLAG) (declare (special OUTPUTSTREAM)) (PROG (FT oft SFN X EDINFILE FILE DEF KEY RECNO U W SOURCEFILES - ECHO-META SINGLINEMODE XCAPE XTOKENREADER INPUTSTREAM SPADERRORSTREAM + |$Echo| SINGLINEMODE XCAPE XTOKENREADER INPUTSTREAM SPADERRORSTREAM ISID NBLNK COMMENTCHR $TOKSTACK (/SOURCEFILES |$sourceFiles|) METAKEYLST DEFINITION_NAME (|$sourceFileTypes| '(|spad| |boot| |lisp| |lsp| |meta|)) ($FUNCTION FN) $NEWSPAD $LINESTACK $LINENUMBER STACK STACKX BACK OK TRAPFLAG |$InteractiveMode| TOK ERRCOL COLUMN *QUERY CHR LINE (*COMP370-APPLY* (if (eq op 'define) #'eval-defun #'compile-defun))) - (declare (special ECHO-META SINGLINEMODE XCAPE XTOKENREADER INPUTSTREAM + (declare (special |$Echo| SINGLINEMODE XCAPE XTOKENREADER INPUTSTREAM SPADERRORSTREAM ISID NBLNK COMMENTCHR $TOKSTACK /SOURCEFILES METAKEYLST DEFINITION_NAME |$sourceFileTypes| $FUNCTION $NEWSPAD $LINESTACK $LINENUMBER STACK STACKX BACK OK @@ -245,7 +245,7 @@ ;(NXTTOK) ;(SETQ LINE (CURINPUTLINE)) ;(SETQ SPADERRORSTREAM CUROUTSTREAM) - ;(AND /ECHO (SETQ ECHO-META 'T) (PRINTEXP LINE) (TERPRI)) + ;(AND /ECHO (SETQ |$echo| 'T) (PRINTEXP LINE) (TERPRI)) ;(SFN) (SETQ DEF (BOOT-PARSE-1 INPUTSTREAM)) (SETQ DEBUGMODE 'YES) diff --git a/src/interp/int-top.boot b/src/interp/int-top.boot index a200fc17..2c1cb0ed 100644 --- a/src/interp/int-top.boot +++ b/src/interp/int-top.boot @@ -44,7 +44,7 @@ ncParseFromString s == zeroOneTran packageTran CATCH($SpadReaderTag, parseFromString s) ncINTERPFILE(file, echo) == - $EchoLines: local := echo + $Echo: local := echo $ReadingFile: local := true SpadInterpretFile file @@ -199,7 +199,7 @@ intloopEchoParse s== [dq,stream]:=first s [lines,rest]:=ncloopDQlines(dq,$lines) setCurrentLine(mkLineList(lines)) - if $EchoLines then ncloopPrintLines lines + if $Echo then ncloopPrintLines lines $lines:=rest [[[lines,npParse dqToList dq]],:rest s] diff --git a/src/interp/metalex.lisp b/src/interp/metalex.lisp index 73d6bee1..e6cc1485 100644 --- a/src/interp/metalex.lisp +++ b/src/interp/metalex.lisp @@ -168,7 +168,6 @@ ; *** Next Line -(defparameter Echo-Meta nil "T if you want a listing of what has been read.") (defparameter Line-Handler 'next-META-line "Who grabs lines for us.") (defun next-line (&optional (in-stream t)) (funcall Line-Handler in-stream)) @@ -461,7 +460,7 @@ empty (if File-Closed (return nil)) (get-a-line in-stream)))) (if (= (length string) 0) (go empty)) (Line-New-Line (suffix #\Space string) Current-Line) - (if Echo-Meta (Print-New-Line (Line-Buffer Current-Line) out-stream)) + (if |$Echo| (Print-New-Line (Line-Buffer Current-Line) out-stream)) (return t))) (defparameter Comment-Character #\% "Delimiter of comments in Meta code.") diff --git a/src/interp/parsing.lisp b/src/interp/parsing.lisp index 7f923a61..ffb2bc55 100644 --- a/src/interp/parsing.lisp +++ b/src/interp/parsing.lisp @@ -226,13 +226,6 @@ the stack, then stack a NIL. Return the value of prod." (let ((x (string<= part whole))) (and x (= x (length part)) x))) - -; 3A 3. Line Handling. - -; PARAMETERS DEFINED IN THIS SECTION: -; -; Echo-Meta - ; 3B. Error handling (defparameter errcol nil) diff --git a/src/interp/patches.lisp b/src/interp/patches.lisp index a67c10c3..cfbd9d0f 100644 --- a/src/interp/patches.lisp +++ b/src/interp/patches.lisp @@ -69,21 +69,21 @@ #+(and :GCL :IEEE-FLOATING-POINT ) (setq system:*print-nans* T) -(defun /RF (&rest foo &aux (Echo-Meta 'T)) - (declare (special Echo-Meta)) +(defun /RF (&rest foo &aux (|$Echo| 'T)) + (declare (special |$Echo|)) (/RF-1 nil)) -(defun /RQ (&rest foo &aux (Echo-Meta nil)) - (declare (special Echo-Meta)) +(defun /RQ (&rest foo &aux (|$Echo| nil)) + (declare (special |$Echo|)) (/RF-1 nil)) -(defun |/RQ,LIB| (&rest foo &aux (Echo-Meta nil) ($LISPLIB T)) - (declare (special Echo-Meta $LISPLIB)) +(defun |/RQ,LIB| (&rest foo &aux (|$Echo| nil) ($LISPLIB T)) + (declare (special |$Echo| $LISPLIB)) (/RF-1 nil)) (defun /RF-1 (ignore) (declare (ignore ignore)) - (declare (special echo-meta)) + (declare (special |$Echo|)) (let* ((input-file (make-input-filename /EDITFILE)) (lfile ()) (type (pathname-type input-file))) @@ -96,7 +96,7 @@ ((string= type "lisp") (load input-file)) ((string= type "bbin") (load input-file)) ((string= type "input") - (|ncINTERPFILE| input-file Echo-Meta)) + (|ncINTERPFILE| input-file |$Echo|)) (t (spad input-file))))) (defun /EF (&rest foo) diff --git a/src/interp/preparse.lisp b/src/interp/preparse.lisp index cdf104b7..488afcba 100644 --- a/src/interp/preparse.lisp +++ b/src/interp/preparse.lisp @@ -330,7 +330,7 @@ ;; (and (stringp line) (incf $INDEX)) ;; (if (NOT (STRINGP LINE)) (RETURN (CONS $INDEX LINE))) ;; (setq LINE (DROPTRAILINGBLANKS LINE)) -;; (if Echo-Meta (PUSH (COPY-SEQ LINE) $EchoLineStack)) +;; (if |$Echo| (PUSH (COPY-SEQ LINE) $EchoLineStack)) ;; ; next line must evaluate $INDEX before recursive call ;; (RETURN ;; (CONS $INDEX @@ -342,7 +342,7 @@ ;; LINE))))) (defun PREPARSE-ECHO (linelist) - (if Echo-Meta (REPEAT (IN X (REVERSE $EchoLineStack)) + (if |$Echo| (REPEAT (IN X (REVERSE $EchoLineStack)) (format out-stream "~&;~A~%" X))) (setq $EchoLineStack ())) diff --git a/src/interp/sys-driver.boot b/src/interp/sys-driver.boot index ab3620e9..fd08789b 100644 --- a/src/interp/sys-driver.boot +++ b/src/interp/sys-driver.boot @@ -280,8 +280,7 @@ associateRequestWithFileType(Option '"script", '"input", compileSpadLibrary(progname,options,file) == $displayStartMsgs := false initializeGlobalState() - $EchoLines := false - ECHO_-META : fluid := false + $Echo: local := false $verbose := false $ProcessInteractiveValue := true $PrintCompilerMessageIfTrue := $verbose diff --git a/src/interp/sys-globals.boot b/src/interp/sys-globals.boot index c6e31a4d..9b5f8415 100644 --- a/src/interp/sys-globals.boot +++ b/src/interp/sys-globals.boot @@ -377,6 +377,8 @@ LINE := nil CHR := nil TOK := nil +$Echo := false + ++ answers x has y category questions _*HASCATEGORY_-HASH_* := nil @@ -450,9 +452,6 @@ $formulaOutputStream := conOutStream := MAKE_-SYNONYM_-STREAM "*STANDARD-OUTPUT*" - - - $InputStream := MAKE_-SYNONYM_-STREAM "*STANDARD-INPUT*" |