Example #1
0
def visualize_script(source_text):
    """Process script and return graphviz (dot) source representing application."""
    # Here we need the unprocessed tree
    ir, issuetracker = calvin_parse(source_text)
    v = Visualize()
    dot_source = v.process(ir)
    return dot_source, issuetracker
Example #2
0
def visualize_script(source_text, show_args=False):
    """Process script and return graphviz (dot) source representing application."""
    # Here we need the unprocessed tree ...
    ir, issuetracker = calvin_parse(source_text)
    # ... but expand portlists to simplify rendering
    rw = PortlistRewrite(issuetracker)
    rw.visit(ir)
    r = DotRenderer(show_args, debug=False)
    v = Visualize(renderer=r)
    dot_source = v.process(ir)
    return dot_source, issuetracker
def visualize_script(source_text, show_args=False):
    """Process script and return graphviz (dot) source representing application."""
    # Here we need the unprocessed tree ...
    ir, issuetracker = calvin_parse(source_text)
    # ... but expand portlists to simplify rendering
    rw = PortlistRewrite(issuetracker)
    rw.visit(ir)
    r = DotRenderer(show_args, debug=False)
    v = Visualize(renderer = r)
    dot_source = v.process(ir)
    return dot_source, issuetracker
Example #4
0
def _calvin_cg(source_text, app_name):
    _, ast_root, issuetracker = calvin_parse(source_text)
    cg = DSCodeGen(ast_root, app_name)
    return cg, issuetracker
Example #5
0
def _calvin_cg(source_text, app_name):
    ast_root, issuetracker = calvin_parse(source_text)
    cg = CodeGen(ast_root, app_name)
    return cg, issuetracker
Example #6
0
def _calvin_cg(source_text, app_name):
    global global_root
    ast_root, issuetracker = calvin_parse(source_text)
    global_root = ast_root
    cg = DSCodeGen(ast_root, app_name)
    return cg, issuetracker