Exemplo n.º 1
0
void
graphprinter_visit_identifier (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);

    printf("\tnode_%x [label=\"", node);

    if (node->symbol->decl_linenum == 0)
        printf("UNDECLARED\\n");

    printf("%s\\n'%s'\\n<%s>\",style=filled,color=",
           node->name, node->symbol->name, type_get_lexeme(node->type));

    if (node->symbol->decl_linenum == 0)
        printf(COLOR_EDGE_ERROR);
    else if (node->symbol->is_global)
        printf(COLOR_FILL_GLOBAL);
    else
        printf(COLOR_FILL_LOCAL);

    printf(",fillcolor=");

    if (node->symbol->is_global)
        printf(COLOR_FILL_GLOBAL);
    else
        printf(COLOR_FILL_LOCAL);

    printf("];\n");
}
Exemplo n.º 2
0
void
graphprinter_visit_procfunc_list (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\",style=filled,", node, node->name);
    printf("color="COLOR_EDGE_GROUP",fillcolor="COLOR_FILL_COMMON"];\n");
    ast_node_accept_children(node->children, visitor);
}
Exemplo n.º 3
0
void
graphprinter_visit_parameter (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\",style=filled,", node, node->name);
    printf("fillcolor="COLOR_FILL_COMMON",color=%s];\n",
           (node->type == ERROR) ? COLOR_EDGE_ERROR : COLOR_FILL_COMMON);
    ast_node_accept_children(node->children, visitor);
}
Exemplo n.º 4
0
void
graphprinter_visit_vardecl_list (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\",style=filled,", node, node->name);
    printf("color="COLOR_EDGE_GROUP",fillcolor="COLOR_FILL_COMMON"];\n");
    printf("\nsubgraph cluster_%x {\n\tstyle=dotted;\n", node);
    ast_node_accept_children(node->children, visitor);
    printf("}\n\n");
}
Exemplo n.º 5
0
void
graphprinter_visit_programdecl(struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n[line: %d]\",style=filled,",
           node, node->name, node->linenum);
    printf("color="COLOR_EDGE_GROUP",fillcolor="COLOR_FILL_COMMON"];\n");
    ast_node_accept(node->children, visitor);
    printf("\tnode_%x -> symbol_%x [color=lightgray];\n", node->children, node->children->symbol);
}
void
graphprinter_visit_simplenode (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n[line: %d]\",style=filled,",
           (unsigned)node, node->name, node->linenum);
    printf("fillcolor="COLOR_FILL_COMMON",color=%s];\n",
           (node->type == ERROR) ? COLOR_EDGE_ERROR : COLOR_FILL_COMMON);
    ast_node_accept_children(node->children, visitor);
}
void
graphprinter_visit_callparam (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n<%s>\",style=filled,",
           (unsigned)node, node->name, type_get_lexeme(node->type));
    printf("fillcolor="COLOR_FILL_COMMON",color=%s];\n",
           (node->type == ERROR) ? COLOR_EDGE_ERROR : COLOR_FILL_COMMON);
    ast_node_accept_children(node->children, visitor);
}
Exemplo n.º 8
0
void _brd_render(uint8_t board_orientation){
    lcd_clear12x16();

    print_string(&brd1, 34, 11);

    _print_arrow(board_orientation);

    FontSelector = f6x8;
    print_string(&backprev, 0, 57);
    print_string(&nextsel, X1, 57); 
    
    print_string_2(&affects_all_profiles, 3, 48, HIGHLIGHT_FULL_LINE);
}
Exemplo n.º 9
0
void
graphprinter_visit_procfunc (struct _Visitor *visitor, struct AstNode *node)
{
    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n<%s>\\n[line: %d]\",style=filled,",
           node, node->name, type_get_lexeme(node->type), node->linenum);
    printf("color=blue,fillcolor="COLOR_EDGE_FUNCT"];\n");
    printf("\nsubgraph cluster_%x {\n\tstyle=dotted;\n", node);

    _print_symbol_table(node);
    ast_node_accept_children(node->children, visitor);
    printf("}\n\n");
}
Exemplo n.º 10
0
void
graphprinter_visit_call (struct _Visitor *visitor, struct AstNode *node)
{
    struct AstNode *ident = node->children;
    struct AstNode *plist = ident->sibling;

    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n[line: %d]\",style=filled,",
           node, node->name, node->linenum);
    printf("fillcolor="COLOR_FILL_COMMON",color=%s];\n",
           (node->type == ERROR) ? COLOR_EDGE_ERROR : COLOR_FILL_COMMON);
    printf("\nsubgraph cluster_%x {\n\tstyle=dotted;\n", node);
    ast_node_accept(ident, visitor);
    ast_node_accept(plist, visitor);
    printf("}\n\n");
}
Exemplo n.º 11
0
void
graphprinter_visit_callparam_list (struct _Visitor *visitor, struct AstNode *node)
{
    int i;

    _print_arrow(node);
    printf("\tnode_%x [label=\"%s\\n<", node, node->name);

    for (i = 0; i < node->symbol->params; i++) {
        printf("%s", type_get_lexeme(node->symbol->param_types[i]));
        if (i + 1 < node->symbol->params)
            printf(", ");
    }


    printf(">\",style=filled,fillcolor="COLOR_FILL_COMMON",color=%s];\n",
           (node->type == ERROR) ? COLOR_EDGE_ERROR : COLOR_EDGE_GROUP);

    ast_node_accept_children(node->children, visitor);
}