#!/usr/bin/env python3

import json

lists = {
    "ALL": "source_data/reserved-names.json",
}


def parse_list(listname, filename):
    with open(filename) as file:
        contents = json.load(file)

    return "{} = {{\n{}}}".format(
        listname,
        "".join('    "{}",\n'.format(each.rstrip()) for each in contents),
    )


print("\n\n".join([parse_list(*args) for args in sorted(lists.items())]))
