diff options
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/io.boot | 4 | ||||
-rw-r--r-- | src/interp/preparse.lisp | 6 | ||||
-rw-r--r-- | src/interp/spad-parser.boot | 2 |
4 files changed, 13 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index dd4e73c3..bd998da0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2012-06-05 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/io.boot (readerDeferLine): New. + * interp/preparse.lisp (preparse1): Use it. + * interp/spad-parser.boot (preparse): Likewise. + 2012-06-04 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/spad-parser.boot (preparse): Tidy. 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 |