diff options
author | dos-reis <gdr@axiomatics.org> | 2011-05-28 07:00:13 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2011-05-28 07:00:13 +0000 |
commit | d4b55b57874770ebaf0bd0f79b91ff40a6d94b94 (patch) | |
tree | 1353d1fa1ca5adc163fa61ad8ce94018396a17be /src/boot | |
parent | 414db62082f6e113d0898240887f53fc43d21ae7 (diff) | |
download | open-axiom-d4b55b57874770ebaf0bd0f79b91ff40a6d94b94.tar.gz |
* lisp/core.lisp.in: Define and export readLine and readbyte.
* interp/sys-utility.boot (readByteFromFile): Remove.
* boot/tokens.boot: Don't rename readLine and readByte.
* boot/includer.boot (shoeReadLine): Remove.
(bRgen1): Adjust. Use resdLine.
* algebra/net.spad.pamphlet (InputBinaryFile): Use readByte from
the runtime system.
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/includer.boot | 7 | ||||
-rw-r--r-- | src/boot/strap/includer.clisp | 10 | ||||
-rw-r--r-- | src/boot/strap/tokens.clisp | 2 | ||||
-rw-r--r-- | src/boot/strap/translator.clisp | 4 | ||||
-rw-r--r-- | src/boot/tokens.boot | 2 | ||||
-rw-r--r-- | src/boot/translator.boot | 4 |
6 files changed, 11 insertions, 18 deletions
diff --git a/src/boot/includer.boot b/src/boot/includer.boot index e286d843..a878844d 100644 --- a/src/boot/includer.boot +++ b/src/boot/includer.boot @@ -77,10 +77,6 @@ shoeReadLispString(s,n) == n >= l => nil readLispFromString strconc('"(", subString(s,n,l-n) ,'")") --- read a line from stream -shoeReadLine stream == - readLine(stream, nil, nil) - -- write LINE to standard terminal I/O. shoeConsole line == writeLine(line, _*TERMINAL_-IO_*) @@ -174,7 +170,8 @@ bRgen s == bDelay(function bRgen1,[s]) bRgen1 s == - a := shoeReadLine s => [a,:bRgen s] + a := readLine s + a ~= %nothing => [a,:bRgen s] ["nullstream"] bIgen n == diff --git a/src/boot/strap/includer.clisp b/src/boot/strap/includer.clisp index ad66a280..e74c7ea1 100644 --- a/src/boot/strap/includer.clisp +++ b/src/boot/strap/includer.clisp @@ -24,8 +24,6 @@ (T (READ-FROM-STRING (CONCAT "(" (|subString| |s| |n| (- |l| |n|)) ")")))))))) -(DEFUN |shoeReadLine| (|stream|) (READ-LINE |stream| NIL NIL)) - (DEFUN |shoeConsole| (|line|) (WRITE-LINE |line| *TERMINAL-IO*)) (DEFUN |shoeSpaces| (|n|) (|makeString| |n| (|char| '|.|))) @@ -135,9 +133,11 @@ (DEFUN |bRgen1| (|s|) (PROG (|a|) (RETURN - (COND - ((SETQ |a| (|shoeReadLine| |s|)) (CONS |a| (|bRgen| |s|))) - (T (LIST '|nullstream|)))))) + (PROGN + (SETQ |a| (|readLine| |s|)) + (COND + ((NOT (EQUAL |a| |%nothing|)) (CONS |a| (|bRgen| |s|))) + (T (LIST '|nullstream|))))))) (DEFUN |bIgen| (|n|) (|bDelay| #'|bIgen1| (LIST |n|))) diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 7a5a473e..5465289e 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -235,9 +235,7 @@ (LIST '|not| 'NOT) (LIST '|null| 'NULL) (LIST '|odd?| 'ODDP) (LIST '|or| 'OR) (LIST '|otherwise| 'T) (LIST '|property| 'GET) - (LIST '|readByte| 'READ-BYTE) (LIST '|readInteger| 'PARSE-INTEGER) - (LIST '|readLine| 'READ-LINE) (LIST '|readLispFromString| 'READ-FROM-STRING) (LIST '|readOnly?| 'CONSTANTP) (LIST '|removeDuplicates| 'REMDUP) diff --git a/src/boot/strap/translator.clisp b/src/boot/strap/translator.clisp index 63cd603a..b7170014 100644 --- a/src/boot/strap/translator.clisp +++ b/src/boot/strap/translator.clisp @@ -1221,7 +1221,7 @@ (PROG (|stream| |b| |a|) (RETURN (PROGN - (SETQ |a| (READ-LINE)) + (SETQ |a| (|readLine| *STANDARD-INPUT*)) (COND ((EQL (LENGTH |a|) 0) (WRITE-LINE "Boot Loop; to exit type ] ") (BOOTLOOP)) @@ -1236,7 +1236,7 @@ (PROG (|stream| |b| |a|) (RETURN (PROGN - (SETQ |a| (READ-LINE)) + (SETQ |a| (|readLine| *STANDARD-INPUT*)) (COND ((EQL (LENGTH |a|) 0) (WRITE-LINE "Boot Loop; to exit type ] ") (BOOTPO)) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index 6a73af4c..c0b8134e 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -292,9 +292,7 @@ for i in [ _ ["or", "OR"] , _ ["otherwise", "T"] , _ ["property", "GET"] , _ - ["readByte", "READ-BYTE"], _ ["readInteger", "PARSE-INTEGER"], _ - ["readLine", "READ-LINE"], _ ["readLispFromString", "READ-FROM-STRING"] , _ ["readOnly?","CONSTANTP"], _ ["removeDuplicates", "REMDUP"] , _ diff --git a/src/boot/translator.boot b/src/boot/translator.boot index dd740929..89a4059a 100644 --- a/src/boot/translator.boot +++ b/src/boot/translator.boot @@ -679,7 +679,7 @@ PSTTOMC string== shoePCompileTrees shoeTransformString string BOOTLOOP() == - a := readLine() + a := readLine _*STANDARD_-INPUT_* #a=0=> writeLine '"Boot Loop; to exit type ] " BOOTLOOP() @@ -693,7 +693,7 @@ BOOTLOOP() == BOOTLOOP() BOOTPO() == - a := readLine() + a := readLine _*STANDARD_-INPUT_* #a=0=> writeLine '"Boot Loop; to exit type ] " BOOTPO() |