handle EOF correctly in parser and lexer
authorBrian Templeton <bpt@hcoop.net>
Fri, 25 Jun 2010 03:03:08 +0000 (23:03 -0400)
committerAndy Wingo <wingo@pobox.com>
Tue, 7 Dec 2010 12:21:02 +0000 (13:21 +0100)
commit1dfe593954b094bfd25738f1553baa3a557476a9
treeb01a4dd0f960f4d3ce41103a0c9c4a9240878ee7
parent8295b7c4e5637d363649101fa5080f9d31b80c14
handle EOF correctly in parser and lexer

* module/language/elisp/lexer.scm (lex, get-lexer/1): Return a valid
  token at EOF.
* module/language/elisp/parser.scm (get-expression): Raise an error if
  EOF is reached.
  (read-elisp): If at EOF, return the EOF object instead of attempting
  to read an expression.

Signed-off-by: Andy Wingo <wingo@pobox.com>
module/language/elisp/lexer.scm
module/language/elisp/parser.scm