Beispiel #1
0
static void table_object(void* T)
{
    fprintf(stdout,
            "\t__table__ -> {\n"
            "\t  object=>0x%p,\n"
            "\t  size=>%d,\n"
            "\t  empty=>'%s',\n"
            "\t  begin=>0x%p,\n"
            "\t  end=>0x%p,\n"
            "\t}\n",
            T, table_size(T), (table_empty(T) ? "yes" : "no"),
            table_begin(T), table_end(T)
           );
}
Beispiel #2
0
void machine_print(machine * m)
{
    frame *f = m->current_frame;
    printf("Now: ");
    frame_print(m->now, 0);
    if (m->now->instruction && !table_empty(oyster_bindings(m->now->instruction))) {
        printf(" with the bindings: \n");
        table_print(oyster_bindings(m->now->instruction));
    }
    while (f) {
        printf("frame: ");
        frame_print(f, 0);
        f = f->below;
    }
    if (m->accumulator) {
        printf("accum: ");
        oyster_print(m->accumulator);
    }
    printf
    ("\n--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---\n\n\n\n");
}