Beispiel #1
0
def run(bundle, ast):
    """
    Run the script using the runner and
    generate the DPT.
    """
    rn = Runner(bundle[0], bundle[1], ast)
    rn.run()

    dpt_log = rn.get_log()

    return dpt_log
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()