Re: set_goto_map() has unintentional ++ operator

2014-12-31 Thread Akim Demaille
> Le 30 déc. 2014 à 16:16, Sean Nakasone a écrit : > > i wasnt reading the code thoroughly... i apologize. > > how do run the test suite? make check ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bison

Re: set_goto_map() has unintentional ++ operator

2014-12-30 Thread Sean Nakasone
BOL (sp, i) - ntokens]++; >> from_state[k] = s; >> to_state[k] = sp->states[i]->number; >> } >> } >> >> free (temp_map); >> >> >> >> I appreciate your efforts and follow up. >> >> >> >

Re: set_goto_map() has unintentional ++ operator

2014-12-30 Thread Akim Demaille
number k = temp_map[TRANSITION_SYMBOL (sp, i) - ntokens]++; > from_state[k] = s; > to_state[k] = sp->states[i]->number; >} >} > > free (temp_map); > > > > I appreciate your efforts and follow up. > > > >

Re: set_goto_map() has unintentional ++ operator

2014-12-29 Thread Sean Nakasone
oops! you're right. sorry for the trouble. Sent from my iPhone > On Dec 29, 2014, at 12:06 PM, Hans Aberg wrote: > > >>> On 29 Dec 2014, at 22:40, sean nakasone wrote: >> >> The placement of the ++ makes it a post increment, so it's incremented after >> the statement, so it should not af

Re: set_goto_map() has unintentional ++ operator

2014-12-29 Thread Hans Aberg
> On 29 Dec 2014, at 22:40, sean nakasone 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

Re: set_goto_map() has unintentional ++ operator

2014-12-29 Thread sean nakasone
-- On Mon, 12/29/14, Akim Demaille wrote: Subject: Re: set_goto_map() has unintentional ++ operator To: "Sean Nakasone" Cc: "Bison Help" Date: Monday, December 29, 2014, 5:29 AM > Le 21 déc. 2014 à 21:51, Sean Nakasone a écrit : > > in lalr.c >

Re: set_goto_map() has unintentional ++ operator

2014-12-29 Thread Akim Demaille
> Le 21 déc. 2014 à 21:51, Sean Nakasone a écrit : > > in lalr.c > > the ++ at the end of the following line doesn't have a purpose > > goto_number k = temp_map[TRANSITION_SYMBOL(sp, i) - ntokens]++; > > it can be misleading. hi Sean, Well, this piece of code is old, and it does not seem i

set_goto_map() has unintentional ++ operator

2014-12-21 Thread Sean Nakasone
in lalr.c the ++ at the end of the following line doesn't have a purpose goto_number k = temp_map[TRANSITION_SYMBOL(sp, i) - ntokens]++; it can be misleading. Sent from my iPhone ___ help-bison@gnu.org https://lists.gnu.org/mailman/listinfo/help-bis