aboutsummaryrefslogtreecommitdiff
path: root/src/interp/debug.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp/debug.lisp')
-rw-r--r--src/interp/debug.lisp27
1 files changed, 22 insertions, 5 deletions
diff --git a/src/interp/debug.lisp b/src/interp/debug.lisp
index e0231e65..2b3205ab 100644
--- a/src/interp/debug.lisp
+++ b/src/interp/debug.lisp
@@ -1130,19 +1130,36 @@ EXAMINE (SETQ RECNO (NOTE |$InputStream|))
"Print syntax error indication, underline character, scrub line."
(BUMPERRORCOUNT '|syntax|)
(COND ((AND (EQ DEBUGMODE 'YES) (NOT(CONSOLEINPUTP IN-STREAM)))
- (SPAD_LONG_ERROR))
- ((SPAD_SHORT_ERROR)))
+ (SPAD_LONG_ERROR rd))
+ ((SPAD_SHORT_ERROR rd)))
(|ioClear!| rd)
(throw |$SpadReaderTag| nil))
-(defun SPAD_LONG_ERROR ()
+(defun SPAD_LONG_ERROR (rd)
(SPAD_ERROR_LOC SPADERRORSTREAM)
- (iostat)
+ (|readerPrintCurrentLine| rd)
+ (and |$lineStack| (format t "Currently preparsed lines are:~%~%"))
+ (mapcar #'(lambda (line)
+ (format t "~&~5D> ~A~%" (car line) (cdr Line)))
+ |$lineStack|)
+ (if (= |$validTokens| 0)
+ (format t "~%There are no valid tokens.~%")
+ (format t "~%The number of valid tokens is ~S.~%" |$validTokens|))
+ (if (> |$validTokens| 0)
+ (progn (format t "The current token is~%")
+ (describe |$currentToken|)))
+ (if (> |$validTokens| 1)
+ (progn (format t "The next token is~%")
+ (describe |$nextToken|)))
+ (if (|tokenType| |$priorToken|)
+ (progn (format t "The prior token was~%")
+ (describe |$priorToken|)))
(unless (EQUAL OUT-STREAM SPADERRORSTREAM)
(SPAD_ERROR_LOC OUT-STREAM)
(TERPRI OUT-STREAM)))
-(defun SPAD_SHORT_ERROR () (current-line-show))
+(defun SPAD_SHORT_ERROR (rd)
+ (|readerPrintCurrentLine| rd))
(defun SPAD_ERROR_LOC (STR)
(format str "******** Spad Syntax Error detected ********"))