> On 29 Dec 2014, at 22:40, sean nakasone <seannakas...@yahoo.com> wrote:
> The placement of the ++ makes it a post increment, so it's incremented after > the statement, so it should not affect the value of k. > > It's incrementing values in temp_map, but temp_map is deallocated after the > for loop, so that's why I thought it wasn't doing anything. > > for (s = 0; s < nstates; ++s) > { > transitions *sp = states[s]->transitions; > int i; > for (i = sp->num - 1; i >= 0 && TRANSITION_IS_GOTO (sp, i); --i) > { > goto_number k = temp_map[TRANSITION_SYMBOL (sp, i) - ntokens]++; > from_state[k] = s; > to_state[k] = sp->states[i]->number; > } > } > > free (temp_map); It loops through the inner loop several times though, so the next time, the value has changed. _______________________________________________ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison