diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-06-27 11:12:48 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-06-27 11:39:32 +0200 |
commit | 0895858d8e0d1fa66c6dd0d2e45416488d7de513 (patch) | |
tree | 4eb69dda4eabfe5cadb3d68c850b95313ab5d2e0 /src/derives.c | |
parent | 4efb2f7bd27d496e2aacb8867b53f7d22d8dfeda (diff) | |
download | bison-0895858d8e0d1fa66c6dd0d2e45416488d7de513.tar.gz |
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".
Diffstat (limited to 'src/derives.c')
-rw-r--r-- | src/derives.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |