1 char rcsid_rule
[] = "$Id$";
14 newRule(delta
, erulenum
, lhs
, pat
) DeltaPtr delta
; ERuleNum erulenum
; NonTerminal lhs
; Pattern pat
;
18 p
= (Rule
) zalloc(sizeof(struct rule
));
20 ASSIGNCOST(p
->delta
, delta
);
21 p
->erulenum
= erulenum
;
22 if (erulenum
> max_erule_num
) {
23 max_erule_num
= erulenum
;
29 rules
= newList(p
, rules
);
37 dumpNonTerminal(p
->lhs
);
46 dumpRuleList(l
) List l
;
48 foreachList((ListFn
)dumpRule
, l
);