def parse_file(filename): global output global tokens output = '' gdllex.lex_file(filename) tokens = gdllex.tokens yacc.yacc() file = open(filename, 'r').read() yacc.parse(file)
def parse_file(filename): global int_rep global tokens int_rep = IntermediateRep() gdllex.lex_file(filename) tokens = gdllex.tokens yacc.yacc() file = open(filename, 'rU').read() yacc.parse(file)