(self, tokens, command, min_size, max_size=None)
Parses a sequence of N atoms (min_size <= N <= max_size) consuming
        the tokens
Parses a sequence of N atoms (min_size <= N <= max_size) consuming
        the tokens
Parses a sequence of N atoms ( min_size < = N < = max_size ) consuming the tokens
def parse_atoms(self, tokens, command, min_size, max_size=None):
        """
        Parses a sequence of N atoms (min_size <= N <= max_size) consuming
        the tokens
        """
        if max_size is None:
            max_size = min_size

        res = []
        current = None
        for _ in range(min_size):
            current = tokens.consume("Unexpected end of stream in %s "
                                             "command." % command)
            if current == ")":
                raise PysmtSyntaxError("Expected at least %d arguments in "
                                       "%s command." %
                                       (min_size, command),
                                       tokens.pos_info)
            if current == "(":
                raise PysmtSyntaxError("Unexpected token '(' in %s "
                                       "command." % command,
                                       tokens.pos_info)
            res.append(current)
        for _ in range(min_size, max_size + 1):
            current = tokens.consume("Unexpected end of stream in %s "
                                             "command." % command)
            if current == ")":
                return res
            if current == "(":
                raise PysmtSyntaxError("Unexpected token '(' in %s "
                                       "command." % command,
                                       tokens.pos_info)
            res.append(current)
        raise PysmtSyntaxError("Unexpected token '%s' in %s command. Expected "
                               "at most %d arguments." %
                               (current, command, max_size),
                               tokens.pos_info)
def parse_atoms ( self , tokens , command , min_size , max_size = None ) : if max_size is None : max_size = min_size res = [ ] current = None for _ in range ( min_size ) : current = tokens . consume ( "Unexpected end of stream in %s " "command." % command ) if current == ")" : raise PysmtSyntaxError ( "Expected at least %d arguments in " "%s command." % ( min_size , command ) , tokens . pos_info ) if current == "(" : raise PysmtSyntaxError ( "Unexpected token '(' in %s " "command." % command , tokens . pos_info ) res . append ( current ) for _ in range ( min_size , max_size + 1 ) : current = tokens . consume ( "Unexpected end of stream in %s " "command." % command ) if current == ")" : return res if current == "(" : raise PysmtSyntaxError ( "Unexpected token '(' in %s " "command." % command , tokens . pos_info ) res . append ( current ) raise PysmtSyntaxError ( "Unexpected token '%s' in %s command. Expected " "at most %d arguments." % ( current , command , max_size ) , tokens . pos_info )