'Read in a list of parameters from the tokens and return the list.
Reads in a set of tokens by consuming symbols. If the returned list of
values is not intended to be used within a list, only accepts literals,
positional parameters, or named parameters. If the returned list of
values is intended to be used within a list, also accepts values
(cast operator, params) which represent a custom GAE Type and are
returned by __TypeCast.
Args:
values_intended_for_list: Boolean to determine if the returned value list
is intended to be used as values in a list or as values in a custom
GAE Type. Defaults to False.
Returns:
A list of values parsed from the input, with values taking the form of
strings (unbound, named reference), integers (unbound, positional
reference), Literal() (bound value usable directly as part of a filter
with no additional information), or a tuple (cast operator, params)
representing a custom GAE Type. Or empty list if nothing was parsed.'

def __GetValueList(self, values_intended_for_list=False):

    params = []
    while True:
        reference = self.__Reference()
        if reference:
            params.append(reference)
        else:
            literal = self.__Literal()
            if literal:
                params.append(literal)
            elif values_intended_for_list:
                type_cast = self.__TypeCast(can_cast_list=False)
                if (type_cast is None):
                    self.__Error('Filter    list    value    could    not    be    cast    to    a    datastore    type')
                params.append(type_cast)
            else:
                self.__Error('Parameter    list    requires    literal    or    reference    parameter')
        if (not self.__Accept(',')):
            break
    return params
