import re


def parse_map_file(path):
    """
    Parse libgccjit.map, returning the symbols in the API as a list of str.
    """
    syms = []
    with open(path) as f:
        for line in f:
            m = re.match('^\s+([a-z_]+);$', line)
            if m:
                syms.append(m.group(1))
    return syms