chiark / gitweb /
src/lexer-proto.lisp (lexer-error): Fix spin from bad `format' string.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 22 Jul 2017 17:12:57 +0000 (18:12 +0100)
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.

src/lexer-proto.lisp

index d6d33cbf4b24f7a42bf7bb7804a525fc97a46c56..1850326747a8982cdf7981f2330f9c1d26467117 100644 (file)
@@ -82,7 +82,7 @@ (export 'lexer-error)
 (defun lexer-error (char-scanner expected consumedp)
   "Signal a continuable lexical error."
   (cerror* "Lexical error: ~
-           expected ~{~#[<bug>~;~A~;~A or ~A~;:~A, ~]~} ~
+           expected ~{~#[<bug>~;~A~;~A or ~A~:;~A, ~]~} ~
            but found ~/sod::show-char/~
            ~@[ at ~A~]"
           (mapcar (lambda (exp)