From 0895858d8e0d1fa66c6dd0d2e45416488d7de513 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 27 Jun 2020 11:12:48 +0200 Subject: style: use 'nonterminal' consistently * doc/bison.texi: Formatting changes. * src/gram.h, src/gram.c (nvars): Rename as... (nnterms): this. Adjust dependencies. (section): New. Use it. Replace "non terminal" and "non-terminal" by "nonterminal". --- src/derives.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/derives.c') diff --git a/src/derives.c b/src/derives.c index 178c0855..f0d334c7 100644 --- a/src/derives.c +++ b/src/derives.c @@ -62,7 +62,7 @@ derives_compute (void) { /* DSET[NTERM - NTOKENS] -- A linked list of the numbers of the rules whose LHS is NTERM. */ - rule_list **dset = xcalloc (nvars, sizeof *dset); + rule_list **dset = xcalloc (nnterms, sizeof *dset); /* DELTS[RULE] -- There are NRULES rule number to attach to nterms. Instead of performing NRULES allocations for each, have an array @@ -82,9 +82,9 @@ derives_compute (void) /* DSET contains what we need under the form of a linked list. Make it a single array. */ - derives = xnmalloc (nvars, sizeof *derives); + derives = xnmalloc (nnterms, sizeof *derives); /* Q is the storage for DERIVES[...] (DERIVES[0] = q). */ - rule **q = xnmalloc (nvars + nrules, sizeof *q); + rule **q = xnmalloc (nnterms + nrules, sizeof *q); for (symbol_number i = ntokens; i < nsyms; ++i) { -- cgit v1.2.1