How to get rid of segmentation fault?
                        int found = 0;
                        Dependency *current = curr_dep;
                        if (head_rule->dependencies != NULL) {
                            while (current != NULL) {
                                Rule *current_rule = current->rule;
                                while (current_rule != NULL) {
                                    if (strcmp(current->rule->target, sub_token) == 0) {
                                        found += 1;
                                        break;
                                    }
                                    current_rule = current_rule->next_rule;
                                }
                                current = current->next_dep;
                            }
                        }