def get_new_script(script, script_path): my_preanalyzer = Preanalyzer(script) if my_preanalyzer.check() is False: return False my_tokenizer = Tokenizer(script) ast = my_tokenizer.tokenize() rn = Runner(script, script_path, ast) rn.run() dpt_log = rn.get_log() analysis = DPTAnalyzer.analize(dpt_log) rewrt = Rewriter(script, analysis) return rewrt.rewrite()
def verify_input(bundle): """ Use the Preanalyzer class to check the input """ analyzer = Preanalyzer(bundle[0]) return analyzer.check()