why is tis giving me infinite while loop?
   if(is_comment_or_empty(line) != 1){
            // printf("%s\n", line[0]);

            char *token;
            token = strtok(line, " ");

            while(token != NULL){
                if((isspace(token[0]) == 0 )&& (strcmp(token, ":") != 0) && (token[0] != '\t')){
                    Rule *r = NULL;
                    Rule *curr2 = head;
                    // Check if rule already exists
                    while(curr2 != NULL){
                        printf("%s\n", curr2->target);
                        if(strcmp(curr2->target, token) == 0){
                            r = curr2;
                            break;
                        }
                        curr2 = curr2->next_rule;
                    }

                    // Rule doesn't exists
                    if(r == NULL){
                        r = malloc(sizeof(Rule));
                        r->target = strdup(token);
                        r->actions = NULL;
                        r->dependencies = NULL;
                        r->next_rule = NULL;
                    }
                
                    // Now append to head
                    if(head == NULL){
                        head = r;
                    }else{
                        Rule *curr = head;
                        while(curr-> next_rule!= NULL){
                            curr = curr->next_rule;
                        }
                        curr->next_rule = r;
                    } 
                }
                token = strtok(NULL, " ");
            }
            
        }
    }
    return head; 
}