<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def advance(self, id=None):
 """ Advance to next token, optionally check that current token is 'id' """


        if id and self.token.id != id:
            raise SyntaxError("Expected {0}".format(id))
        self.token = self.next()