def parse_testfile(testprogs_dir, testfile, debug=False): print("parse_testfile: _______________________________________________________________") print("parse_testfile: PARSING", os.path.join(testprogs_dir,testfile)) print() AST = parse_file(os.path.join(testprogs_dir,testfile)) if debug: pprint.pprint(AST) JAST = jdump(AST) pprint.pprint(JAST) return AST
def parse_testfile(testprogs_dir, testfile, debug=False): print("_______________________________________________________________") print("PARSING", os.path.join(testprogs_dir,testfile)) print() AST = parse_file(os.path.join(testprogs_dir,testfile)) if debug: pprint.pprint(AST) JAST = jdump(AST) pprint.pprint(JAST) return AST
def parsing_tests(): # Run parsing tests. These are in the "progs" test directory, and are in # filenames ending ".p" rootdir = os.getcwd() testprogs = get_test_programs(".p") for testfile in testprogs: AST = parse_testfile(testprogs_dir, testfile) pprint.pprint(AST) JAST = jdump(AST) pprint.pprint(JAST) os.chdir(rootdir)