(self, msg=None)
Consumes and returns a single token from the stream.
           If the stream is empty, a PysmtSyntaxError is thrown
Consumes and returns a single token from the stream.
           If the stream is empty, a PysmtSyntaxError is thrown
Consumes and returns a single token from the stream . If the stream is empty a PysmtSyntaxError is thrown
def consume(self, msg=None):
        """Consumes and returns a single token from the stream.
           If the stream is empty, a PysmtSyntaxError is thrown"""
        if self.extra_queue:
            return self.extra_queue.popleft()
        else:
            try:
                t = self.consume_maybe()
            except StopIteration:
                if msg:
                    raise PysmtSyntaxError (msg, self.pos_info)
                else:
                    raise PysmtSyntaxError("Unexpected end of stream.",
                                           self.pos_info)
            return t
def consume ( self , msg = None ) : if self . extra_queue : return self . extra_queue . popleft ( ) else : try : t = self . consume_maybe ( ) except StopIteration : if msg : raise PysmtSyntaxError ( msg , self . pos_info ) else : raise PysmtSyntaxError ( "Unexpected end of stream." , self . pos_info ) return t