WhaleSpunk

Untitled

Apr 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. void printTable(Table_node *node){
  2. Table_node *aux = node->child;
  3. int count =0;
  4. printf("==== %s %s Symbol Table ====\n", node->type, node->name);
  5. while(aux != NULL){
  6.  
  7. printf("%s %s %s %s\n", aux->name, aux->paramsType, aux->type, aux->flag);
  8. if(aux->child != NULL){
  9. count++;
  10. }
  11. aux = aux->brother;
  12. }
  13. Table_node *aux2 = node->child;
  14. while(count != 0){
  15.  
  16. if(aux2->child != NULL){
  17.  
  18. count--;
  19. Table_node *aux3 = aux->child;
  20. printf("==== Method %s Symbol Table ====\n", aux3->name);
  21. while(aux3 != NULL){
  22. printf("%s %s %s %s\n", aux3->name, aux3->paramsType, aux3->type, aux3->flag);
  23. aux3 = aux3->brother;
  24. }
  25.  
  26. }
  27. aux2 = aux2->brother;
  28.  
  29.  
  30. }
  31.  
  32.  
  33.  
  34.  
  35. }
Add Comment
Please, Sign In to add comment