def tokenize(bundle): """ Use the tokenizer class to get the AST. """ tk = Tokenizer(bundle[0]) ast = tk.tokenize() return ast
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()