Extract a token generator