aboutsummaryrefslogtreecommitdiff
path: root/src/interp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2012-06-05 07:35:25 +0000
committerdos-reis <gdr@axiomatics.org>2012-06-05 07:35:25 +0000
commit6f764e775b40fa70adb6268d936c04d9acbd474c (patch)
tree8aad22818a1ebec6c22b2cb0a543c4742ea4d00c /src/interp
parent2b474c0f87a7e271484f898b0024a9449cc52cbe (diff)
downloadopen-axiom-6f764e775b40fa70adb6268d936c04d9acbd474c.tar.gz
* interp/io.boot (readerDeferLine): New.
* interp/preparse.lisp (preparse1): Use it. * interp/spad-parser.boot (preparse): Likewise.
Diffstat (limited to 'src/interp')
-rw-r--r--src/interp/io.boot4
-rw-r--r--src/interp/preparse.lisp6
-rw-r--r--src/interp/spad-parser.boot2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/interp/io.boot b/src/interp/io.boot
index 1d039259..7c85719f 100644
--- a/src/interp/io.boot
+++ b/src/interp/io.boot
@@ -111,3 +111,7 @@ structure %Reader ==
makeReader ist ==
mk%Reader(ist,nil,makeLine())
+
+++ Add line `l' to the stack of pending lines.
+readerDeferLine(rd,l) ==
+ readerLines(rd) := [l,:readerLines rd]
diff --git a/src/interp/preparse.lisp b/src/interp/preparse.lisp
index 8af7c8b3..6cd27096 100644
--- a/src/interp/preparse.lisp
+++ b/src/interp/preparse.lisp
@@ -128,10 +128,8 @@
(SETQ NCOMBLOCK (CONS N (CONS A (IFCDR NCOMBLOCK))))
(SETQ A ""))
('T
- (SETF (|readerLines| rd)
- (CONS (STRCONC (|makeString| N #\Space)
- (SUBSTRING A N ()))
- (|readerLines| rd)))
+ (|readerDeferLine| rd (STRCONC (|makeString| N #\Space)
+ (SUBSTRING A N NIL)))
(SETQ $INDEX (1- $INDEX))
(SETQ A (SUBSEQ A 0 N))))
(GO NOCOMS))
diff --git a/src/interp/spad-parser.boot b/src/interp/spad-parser.boot
index 33e30965..2ee118e8 100644
--- a/src/interp/spad-parser.boot
+++ b/src/interp/spad-parser.boot
@@ -199,7 +199,7 @@ preparse rd ==
$COMBLOCKLIST := nil
$SKIPME := false
if $preparseLastLine ~= nil then
- readerLines(rd) := [$preparseLastLine,:readerLines rd]
+ readerDeferLine(rd,$preparseLastLine)
$INDEX := $INDEX - #readerLines rd
u := preparse1 rd
$SKIPME => preparse rd