Got rid of the ugly chaining of 'prevs' in regex lexical analyzer and replaced it with local pointers holding each 'prev'.