pre/post -amble optimization in lexer

risky changes, hopefully nothing breaks