style: scope reduction in tables.c

* src/tables.c: here.
* src/lalr.c: Prefer < to >.
This commit is contained in:
Akim Demaille
2019-02-12 05:55:54 +01:00
parent 609b40f1a1
commit 2b9ee006d8
2 changed files with 17 additions and 22 deletions

View File

@@ -77,7 +77,7 @@ set_goto_map (void)
for (state_number s = 0; s < nstates; ++s)
{
transitions *sp = states[s]->transitions;
for (int i = sp->num - 1; i >= 0 && TRANSITION_IS_GOTO (sp, i); --i)
for (int i = sp->num - 1; 0 <= i && TRANSITION_IS_GOTO (sp, i); --i)
{
ngotos++;
@@ -109,7 +109,7 @@ set_goto_map (void)
for (state_number s = 0; s < nstates; ++s)
{
const transitions *sp = states[s]->transitions;
for (int i = sp->num - 1; i >= 0 && TRANSITION_IS_GOTO (sp, i); --i)
for (int i = sp->num - 1; 0 <= i && TRANSITION_IS_GOTO (sp, i); --i)
{
goto_number k = temp_map[TRANSITION_SYMBOL (sp, i) - ntokens]++;
from_state[k] = s;