/* -------------------------------------- * listasGA.c * Abstract Grammar implementation file * -------------------------------------- */ #include "listasGA.h" List cons_P0() { List aux; aux = (List) malloc(sizeof(struct sList)); aux->flag = P0; return(aux); } List cons_P1( int n, List l ) { List aux; aux = (List) malloc(sizeof(struct sList)); aux->flag = P1; aux->u.p1.n = n; aux->u.p1.l = l; return(aux); }