modify lexer to use iterators instead of indexes
fully handle source as UTF-8 in lexer