Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void printTable(Table_node *node){
- Table_node *aux = node->child;
- int count =0;
- printf("==== %s %s Symbol Table ====\n", node->type, node->name);
- while(aux != NULL){
- printf("%s %s %s %s\n", aux->name, aux->paramsType, aux->type, aux->flag);
- if(aux->child != NULL){
- count++;
- }
- aux = aux->brother;
- }
- Table_node *aux2 = node->child;
- while(count != 0){
- if(aux2->child != NULL){
- count--;
- Table_node *aux3 = aux->child;
- printf("==== Method %s Symbol Table ====\n", aux3->name);
- while(aux3 != NULL){
- printf("%s %s %s %s\n", aux3->name, aux3->paramsType, aux3->type, aux3->flag);
- aux3 = aux3->brother;
- }
- }
- aux2 = aux2->brother;
- }
- }
Add Comment
Please, Sign In to add comment