chiark / gitweb /
src/lexer-impl.lisp: Don't always skip a token.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 May 2016 08:26:09 +0000 (09:26 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 8 Jun 2018 18:58:28 +0000 (19:58 +0100)
commit450a4be6a6d832ce1e54169d9cc7740f5a04dc89
tree73dc877b5150b17f32eefe7cd19e56028bf3c839
parentdb6c3279edc260e3e301df1c9b082b374cd002c7
src/lexer-impl.lisp: Don't always skip a token.

It's usually, or at least often, the wrong thing to do.  Consider, for
example, how to recover from trying to parse

( list[x] )

when presented with

( )

Instead, add a `:force-progress' argument to the `error' parser.  The
default is /not/ to consume a token; I think this is right.
doc/parsing.tex
src/lexer-impl.lisp
src/lexer-proto.lisp