Ejemplo n.º 1
0
def _pretty_print_aux(p, r, paramdecllist_, roledecllist_, body):
    text = ""
    text = text + constants.LOCAL_KW + ' ' + constants.PROTOCOL_KW + ' '
    text = text + p + ' '
    text = text + constants.AT_KW + ' ' + role_get_role_name(r)
    if util.get_node_type(paramdecllist_) != \
            parameterdecllist_EMPTY_PARAMETER_DECL_LIST:
        text = text + parameterdecllist_pretty_print(paramdecllist_)
    text = text + roledecllist_pretty_print(roledecllist_)
    child = body
    if util.get_node_type(child) == constants.LOCAL_PROTOCOL_DEF_NODE_TYPE:
        text = text + localprotocoldef_pretty_print(child)
    else:
        raise RuntimeError("TODO:", util.get_node_type(child))
    return text
Ejemplo n.º 2
0
def _pretty_print_aux(p, r, paramdecllist_, roledecllist_, body):
    text = ""
    text = text + constants.LOCAL_KW + ' ' + constants.PROTOCOL_KW + ' '
    text = text + p + ' '
    text = text + constants.AT_KW + ' ' + role_get_role_name(r)
    if util.get_node_type(paramdecllist_) != \
            parameterdecllist_EMPTY_PARAMETER_DECL_LIST:
        text = text + parameterdecllist_pretty_print(paramdecllist_)
    text = text + roledecllist_pretty_print(roledecllist_)
    child = body
    if util.get_node_type(child) == constants.LOCAL_PROTOCOL_DEF_NODE_TYPE:
        text = text + localprotocoldef_pretty_print(child)
    else:
        raise RuntimeError("TODO:", util.get_node_type(child))
    return text
Ejemplo n.º 3
0
def get_source(node_):
    return role_get_role_name(get_source_child(node_))
Ejemplo n.º 4
0
def get_local_role_name(node_):
    return role_get_role_name(get_local_role_child(node_))
Ejemplo n.º 5
0
def get_local_role_name(node_):
    return role_get_role_name(get_local_role_child(node_))
Ejemplo n.º 6
0
def get_destinations(node_):
    dests = []
    for child in get_destination_children(node_):
        dests.append(role_get_role_name(child))
    return dests