Action *anode = malloc(sizeof(Action));
// add values to anode; code omitted

// put the action node into the rule
Action **ap = &(cur_rule->actions); // pointer to pointer of actions
while(*ap != NULL){   
    *ap = (*ap)->next_act;
}
*ap = anode;