Implement more lexing primitives, actually use memotable