prototype for token parser