From: Mark Wooding Date: Thu, 26 May 2016 08:26:09 +0000 (+0100) Subject: src/lexer-proto.lisp (lexer-error): Fix spin from bad `format' string. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/c1098ad8614af0cf52d057df6e9c2a17aaf19fe3?hp=be2410a046c2c1841ab6422da67bdcb8cb081903 src/lexer-proto.lisp (lexer-error): Fix spin from bad `format' string. What should have been the `else' branch of the hairy list presentation said `~;:' instead of `~:;', with the result that if there are four or more expected character sequences, no branch of the conditional matches, and the loop body doesn't consume any items so it spins forever. --- diff --git a/src/lexer-proto.lisp b/src/lexer-proto.lisp index d6d33cb..1850326 100644 --- a/src/lexer-proto.lisp +++ b/src/lexer-proto.lisp @@ -82,7 +82,7 @@ (export 'lexer-error) (defun lexer-error (char-scanner expected consumedp) "Signal a continuable lexical error." (cerror* "Lexical error: ~ - expected ~{~#[~;~A~;~A or ~A~;:~A, ~]~} ~ + expected ~{~#[~;~A~;~A or ~A~:;~A, ~]~} ~ but found ~/sod::show-char/~ ~@[ at ~A~]" (mapcar (lambda (exp)