Updating the first and follow calculation based on token types