Take an array of token and produce a more useful API to give to a parser