lexer: fix a bug in error handling code
Merge pull request #4 from iley/master

Fix a bug in error handling functions in lexer.py