Revert "Garbage attempt at rewriting the lexer."

This reverts commit 8c93489fcd6ea95155dc61cb90816b4436ed9b7d.