1 char rcsid_nonterminal
[] = "$Id$";
8 NonTerminalNum max_nonterminal
= 1;
9 NonTerminalNum last_user_nonterminal
;
13 newNonTerminal(name
) char *name
;
17 nt
= (NonTerminal
) zalloc(sizeof(struct nonterminal
));
19 if (max_nonterminal
== 1) {
23 nt
->num
= max_nonterminal
++;
24 nonterminals
= newList(nt
, nonterminals
);
30 nonTerminalName(buf
, i
) char *buf
; int i
;
34 for (l
= nonterminals
; l
; l
= l
->next
) {
35 NonTerminal nt
= (NonTerminal
) l
->x
;
37 strcpy(buf
, nt
->name
);
41 strcpy(buf
, "(Unknown NonTerminal)");
46 dumpNonTerminal(n
) NonTerminal n
;
48 printf("%s(%d)", n
->name
, n
->num
);