def delimitedList(expr, delim=',', combine=False):
 dlName = (((((_ustr(expr) + ' [') + _ustr(delim)) + ' ') + _ustr(expr)) + ']...')
 if combine:
  return Combine((expr + ZeroOrMore((delim + expr)))).setName(dlName)
 else:
  return (expr + ZeroOrMore((Suppress(delim) + expr))).setName(dlName)

def delimitedList ( expr , delim = ',' , combine = False ) : dlName = ( ( ( ( ( _ustr ( expr ) + ' [' ) + _ustr ( delim ) ) + ' ' ) + _ustr ( expr ) ) + ']...' ) if combine : return Combine ( ( expr + ZeroOrMore ( ( delim + expr ) ) ) ) . setName ( dlName ) else : return ( expr + ZeroOrMore ( ( Suppress ( delim ) + expr ) ) ) . setName ( dlName )
helper to define a delimited list of expressions - the delimiter defaults to .