示例#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
示例#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
示例#3
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
示例#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
示例#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
示例#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