void summary() { printf("\n -- %d errors found.",total_errors); fprintf(list,"\f\n *** global scope typedef symbol table ***\n\n"); ListTable(&gsyms,0); fprintf(list,"\n *** structures and unions ***\n\n"); ListTable(&tagtable,0); fflush(list); }
void summary() { // if (verbose > 0) printf("\n -- %d errors found.",total_errors); lfs.write("\f\n *** global scope typedef symbol table ***\n\n"); ListTable(&gsyms[0],0); lfs.write("\n *** structures and unions ***\n\n"); ListTable(&tagtable,0); // fflush(list); }
void funcbottom(Statement *stmt) { Statement *s, *s1; dfs.printf("Enter funcbottom\n"); nl(); check_table(SYM::GetPtr(currentFn->lsyms.GetHead())); lc_auto = 0; lfs.printf("\n\n*** local symbol table ***\n\n"); ListTable(¤tFn->lsyms,0); // Should recurse into all the compound statements if (stmt==NULL) dfs.printf("DIAG: null statement in funcbottom.\r\n"); else { if (stmt->stype==st_compound) ListCompound(stmt); } lfs.printf("\n\n\n"); // ReleaseLocalMemory(); // release local symbols isPascal = FALSE; isKernel = FALSE; isOscall = FALSE; isInterrupt = FALSE; isNocall = FALSE; dfs.printf("Leave funcbottom\n"); }
void funcbottom() { nl(); check_table(&lsyms); lc_auto = 0; fprintf(list,"\n\n*** local symbol table ***\n\n"); ListTable(&lsyms,0); fprintf(list,"\n\n\n"); ReleaseLocalMemory(); /* release local symbols */ isPascal = FALSE; isOscall = FALSE; isInterrupt = FALSE; isNocall = FALSE; }
void list_var(SYM *sp, int i) { TypeArray *ta; int j; for(j = i; j; --j) lfs.printf(" "); if (sp->name->length()== 0) lfs.printf("%-10s =%06x ","<unnamed>",(unsigned int)sp->value.u); else { lfs.printf("%-10s =%06x",(char *)sp->name->c_str(),(unsigned int)sp->value.u); if (sp->tp) if (sp->tp->bit_width != -1) lfs.printf(" %d %d",sp->tp->bit_offset,sp->tp->bit_width); } // if (sp->IsPascal) ofs.printf("\tpascal "); if( sp->storage_class == sc_external) ofs.printf("\textern\t%s\n",(char *)sp->name->c_str()); else if( sp->storage_class == sc_global ) ofs.printf(";\tglobal\t%s\n",(char *)sp->name->c_str()); put_typedef(sp->storage_class==sc_typedef); put_sc(sp->storage_class); put_ty(sp->tp); lfs.printf("\n"); if(sp->tp == 0) return; if (sp->tp) { if (sp->tp->type==bt_ifunc || sp->tp->type==bt_func) { lfs.printf("\t\tParameters:\n\t\t\t"); ta = sp->GetProtoTypes(); ta->Print(&lfs); if (ta) delete ta; lfs.printf("Stack Space:\n\t\t"); lfs.printf("Argbot: %d\n\t\t", sp->argbot); lfs.printf("Tmpbot: %d\n\t\t", sp->tempbot); lfs.printf("Stkspc: %d\n\t\t", sp->stkspace); } } if (sp->tp) { if((sp->tp->type == bt_struct || sp->tp->type == bt_union || sp->tp->type==bt_class) && sp->storage_class == sc_type) ListTable(&(sp->tp->lst),i+1); } }
void ListCompound(Statement *stmt) { Statement *s1; ListTable(&stmt->ssyms,0); for (s1 = stmt->s1; s1; s1 = s1->next) { if (s1->stype == st_compound) ListCompound(s1); if (s1->s1) { if (s1->s1->stype==st_compound) ListCompound(s1->s1); } if (s1->s2) { if (s1->s2->stype==st_compound) ListCompound(s1->s2); } } }
void list_var(SYM *sp, int i) { int j; for(j = i; j; --j) fprintf(list," "); if (sp->name == NULL) fprintf(list,"%-10s =%06x ","<unnamed>",sp->value.u); else fprintf(list,"%-10s =%06x ",sp->name,sp->value.u); if( sp->storage_class == sc_external) fprintf(output,"\textern\t%s\n",sp->name); else if( sp->storage_class == sc_global ) fprintf(output,";\tglobal\t%s\n",sp->name); put_typedef(sp->storage_class==sc_typedef); put_sc(sp->storage_class); put_ty(sp->tp); fprintf(list,"\n"); if(sp->tp == 0) return; if((sp->tp->type == bt_struct || sp->tp->type == bt_union) && sp->storage_class == sc_type) ListTable(&(sp->tp->lst),i+1); }
void funcbottom(Statement *stmt) { Statement *s, *s1; nl(); check_table(lsyms.head); lc_auto = 0; fprintf(list,"\n\n*** local symbol table ***\n\n"); ListTable(&lsyms,0); // Should recurse into all the compound statements if (stmt==NULL) printf("DIAG: null statement in funcbottom.\r\n"); else { if (stmt->stype==st_compound) ListCompound(stmt); } fprintf(list,"\n\n\n"); ReleaseLocalMemory(); /* release local symbols */ isPascal = FALSE; isKernel = FALSE; isOscall = FALSE; isInterrupt = FALSE; isNocall = FALSE; }