Fixed silly mistake in `parse()`, added exception type for lexer.