def parse_glyphs_groups(names, groups):
    """
    Parse a ``gstring`` and a groups dict into a list of glyph names.

    """
    glyph_names = []
    for name in names:
        # group names
        if name[0] == '@':
            group_name = name[1:]
            if group_name in groups:
                glyph_names += groups[group_name]
            else:
                print('project does not have a group called %s.\n' % group_name)
        # glyph names
        else:
            glyph_names.append(name)
    return glyph_names