consumeToken function has been seperated by parseName, consumeName and resolveName