realnamelist : realnamelist COMMA realname
320197
def p_realnamelist(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
1067319
def p_print_list_comma(p):
    
    p[0] = p[1]
    p[0].eol = (p[3] is not None)
    p[0].appendChild(make_sentence('PRINT_COMMA'))

    if p[3] is not None:
        p[0].appendChild(p[3])
1250190
private static void quoteList(final Collection<String> coll, final StringBuilder buf) {
        buf.append('[');
        boolean first = true;
        for (final String item : coll) {
            if (first) {
                first = false;
            } else {
                buf.append(", ");
            }
            buf.append('"');
            for (int i = 0; i < item.length(); i++) {
                final char c = item.charAt(i);
                if (c == '"') {
                    buf.append("\\\"");
                } else {
                    buf.append(c);
                }
            }
            buf.append('"');
        }
        buf.append(']');
    }
1053871
def _str_member_list(self, name):
        
        out = []
        if self[name]:
            out += ['.. rubric:: %s' % name, '']
            prefix = getattr(self, '_name', '')

            if prefix:
                prefix = '~%s.' % prefix

            autosum = []
            others = []
            for param, param_type, desc in self[name]:
                param = param.strip()

                # Check if the referenced member can have a docstring or not
                param_obj = getattr(self._obj, param, None)
                if not (isinstance(param_obj, collections.Callable)
                        or isinstance(param_obj, property)
                        or inspect.isgetsetdescriptor(param_obj)):
                    param_obj = None

                if param_obj and (pydoc.getdoc(param_obj) or not desc):
                    # Referenced object has a docstring
                    autosum += ["   %s%s" % (prefix, param)]
                else:
                    others.append((param, param_type, desc))

            if autosum:
                out += ['.. autosummary::']
                if self.class_members_toctree:
                    out += ['   :toctree:']
                out += [''] + autosum

            if others:
                maxlen_0 = max(3, max([len(x[0]) for x in others]))
                hdr = sixu("=")*maxlen_0 + sixu("  ") + sixu("=")*10
                fmt = sixu('%%%ds  %%s  ') % (maxlen_0,)
                out += ['', hdr]
                for param, param_type, desc in others:
                    desc = sixu(" ").join(x.strip() for x in desc).strip()
                    if param_type:
                        desc = "(%s) %s" % (param_type, desc)
                    out += [fmt % (param.strip(), desc)]
                out += [hdr]
            out += ['']
        return out
398694
def p_realdecl(self, p):
        ''
        reallist = [Real(p[1],
                         Width(msb=IntConst('31', lineno=p.lineno(2)),
                               lsb=IntConst('0', lineno=p.lineno(2)),
                               lineno=p.lineno(2)),
                         lineno=p.lineno(2)) for r in p[2]]
        p[0] = Decl(tuple(reallist), lineno=p.lineno(1))
        p.set_lineno(0, p.lineno(1))
432675
def p_declnamelist(self, p):
        ''
        p[0] = p[1] + (p[3],)
        p.set_lineno(0, p.lineno(1))
231567
def namelist(self):
        """"""
        l = []
        for data in self.filelist:
            l.append(data.filename)
        return l
1169575
def list_names():
    
    names = get_all_names()
    # This is 375 right now. Probably won't ever change, but I'm not sure.
    nameslen = len(names)
    print('\nListing {} names:\n'.format(nameslen))
    # Using 3 columns of names, still alphabetically sorted from the top down.
    # Longest name so far: lightgoldenrodyellow (20 chars)
    namewidth = 20
    # namewidth * columns == 60, colorwidth * columns == 18, final == 78.
    swatch = ' ' * 9

    third = nameslen // 3
    lastthird = third * 2
    cols = (
        names[0: third],
        names[third: lastthird],
        names[lastthird:],
    )
    # Exactly enough spaces to fill in a blank item (+2 for ': ').
    # This may not ever be used, unless another 'known name' is added.
    blankitem = ' ' * (namewidth + len(swatch) + 2)

    for i in range(third):
        nameset = []
        for colset in cols:
            try:
                nameset.append(colset[i])
            except IndexError:
                nameset.append(None)
                continue
        line = C('').join(
            C(': ').join(
                C(name.rjust(namewidth)),
                C(swatch, back=name),
            ) if name else blankitem
            for name in nameset
        )
        print(line)

    return 0
1265090
def property_as_list(self, property_name):
        
        try:
            res = self._a_tags[property_name]
        except KeyError:
            return []

        if type(res) == list:
            return res
        else:
            return [res]
1276195
def abbreviate_list(items, max_items=10, item_max_len=40, joiner=", ", indicator="..."):
  
  if not items:
    return items
  else:
    shortened = [abbreviate_str("%s" % item, max_len=item_max_len) for item in items[0:max_items]]
    if len(items) > max_items:
      shortened.append(indicator)
    return joiner.join(shortened)
431893
def full_name(self):
        
        qid, quality_str, pretty_quality_str = self.quality
        custom_name = self.custom_name
        item_name = self.name
        english = (self._language == "en_US")
        rank = self.rank
        prefixed = self._schema_item.get("proper_name", False)
        prefix = ''
        suffix = ''
        pfinal = ''

        if item_name.startswith("The ") and prefixed:
            item_name = item_name[4:]

        if quality_str != "unique" and quality_str != "normal":
            pfinal = pretty_quality_str

        if english:
            if prefixed:
                if quality_str == "unique":
                    pfinal = "The"
            elif quality_str == "unique":
                pfinal = ''

        if rank and quality_str == "strange":
            pfinal = rank["name"]

        if english:
            prefix = pfinal
        elif pfinal:
            suffix = '(' + pfinal + ') ' + suffix

        return (prefix + " " + item_name + " " + suffix).strip()
308405
protected void processReferencesAndOutput(List<Ref> refList) {
                List<String> refNames = new ArrayList<String>(refList.size());

                for (Ref ref : refList) {
                        refNames.add(GitTaskUtils.sanitizeRefName(ref.getName()));
                }

                if (!namesToCheck.isEmpty()) {
                        if (!refNames.containsAll(namesToCheck)) {
                                List<String> namesCopy = new ArrayList<String>(namesToCheck);
                                namesCopy.removeAll(refNames);

                                throw new GitBuildException(String.format(MISSING_REFS_TEMPLATE, namesCopy.toString()));
                        }
                }

                if (!GitTaskUtils.isNullOrBlankString(outputFilename)) {
                        FileUtils fileUtils = FileUtils.getFileUtils();

                        Echo echo = new Echo();
                        echo.setProject(getProject());
                        echo.setFile(fileUtils.resolveFile(getProject().getBaseDir(), outputFilename));

                        for (int i = 0; i < refNames.size(); i++) {
                                String refName = refNames.get(i);
                                echo.addText(String.format(REF_NAME_TEMPLATE, refName));
                        }

                        echo.perform();
                }
        }
860586
def comma_delimited_to_list(list_param):
    
    if isinstance(list_param, list):
        return list_param
    if isinstance(list_param, str):
        return list_param.split(',')
    else:
        return []
1033209
def full_name_natural_split(full_name):
    
    parts = full_name.strip().split(' ')
    first_name = ""
    if parts:
        first_name = parts.pop(0)
    if first_name.lower() == "el" and parts:
        first_name += " " + parts.pop(0)
    last_name = ""
    if parts:
        last_name = parts.pop()
    if (last_name.lower() == 'i' or last_name.lower() == 'ii'
        or last_name.lower() == 'iii' and parts):
        last_name = parts.pop() + " " + last_name
    middle_initials = ""
    for middle_name in parts:
        if middle_name:
            middle_initials += middle_name[0]
    return first_name, middle_initials, last_name
63315
public static String getEntryNameForList(String property, Integer index) {
        return String.format("%s.%d", property, index);
    }
534660
def param_name_list(self):
        
        name_list = []
        for func in self.func_list:
            name_list.append(func.param_names)
        return name_list
492716
def ref2names2commdct(ref2names, commdct):
    """"""
    for comm in commdct:
        for cdct in comm:
            try:
                refs = cdct['object-list'][0]
                validobjects = ref2names[refs]
                cdct.update({'validobjects':validobjects})
            except KeyError as e:
                continue
    return commdct