def Generate(parser, bison, filename):
    from BisonGen import Common
    import Output

    outfile = Common.CreateFile(filename, format='python')
    Output.Parser(bison).generate(outfile, parser)
    outfile.close()
    return
