in line 11, buffer_line should be assigend to "main : linked_list.o main.o". Suppose we the ngoes into line 18. in line 28, the buffer_line in parse_target_dependency should be "main : linked_list.o main.o", but it turns out to be "main" which is wrong
/* Read from the open file fp, and create the linked data structure
   that represents the Makefile contained in the file.
   See the top of pmake.h for the specification of Makefile contents.
 */
Rule *parse_file(FILE *fp) {
    // Implement this function and remove the stubbed return statement below.
    char buffer_line[MAXLINE];
    Rule* first_rule_ptr = NULL;
    Rule *current_rule = NULL;
    
    while (fgets(buffer_line, MAXLINE, fp) != NULL){
        // buffer_line[MAXLINE - 1] = '\0';
        // If the line is a comment line
        if (is_comment_or_empty(buffer_line)){
            continue;
        }
        // If the line is a target line
        else if (buffer_line[0] != '\t'){
            char buffer_copy[MAXLINE];
            strcpy(buffer_copy, buffer_line);

            // Parse target and dependencies
            if (first_rule_ptr == NULL){
                char *token = strtok(buffer_line, " ");
                first_rule_ptr = init_rule(token);
                current_rule = first_rule_ptr;
            }
            Rule *this_rule = parse_target_dependency(buffer_copy, first_rule_ptr);

            Action *first_action;
            Action *current_action = NULL;
            // Parse Actions
            while (fgets(buffer_line, MAXLINE, fp) != NULL && buffer_line[0] == '\t')
            {
                Action *new_action = parse_action_line(buffer_line);
                // If the linked list of action nodes is empty
                if (current_action == NULL)
                {
                    first_action = new_action;
                    current_action = new_action;
                }else{
                    current_action->next_act = new_action;
                    current_action = current_action->next_act; 
                }
            }
            this_rule->actions = first_action;
            current_rule->next_rule = this_rule;
            current_rule = current_rule->next_rule;
        }
    }
    
    return first_rule_ptr;
}