> 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
Hi Akim, I didn't test it, nor did I run it in a debugger.. so there must be
something I'm not seeing.
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 deall
> 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
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