reworked lexical analysis