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".
This commit is contained in:
Akim Demaille
2020-06-27 11:12:48 +02:00
parent 4efb2f7bd2
commit 0895858d8e
22 changed files with 111 additions and 99 deletions

View File

@@ -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)
{