what's the seg fault?
 if (head != NULL){
                Rule *curr_rule;
                curr_rule = head;
                while(curr_rule != NULL){
                    curr_rule = curr_rule->next_rule;
                }
                
                curr_rule = new_rule;
            }
            else{
                head = malloc(sizeof(Rule));
                head = new_rule;
            }