Make your parser call back into your lexer, so it can pass state to it; make the set of type names available to it.