I apologize for my lack of understanding. You said the next step is to
clean it up in the actions... please clarify?
On Tue, Aug 3, 2010 at 6:13 PM, Hans Aberg wrote:
> You seem to do it already by the strdup(). The next step would be to clean
> it up in the actions.
>
>
> On 3 Aug 2010, at 23:
On 4 Aug 2010, at 14:17, Sasan Forghani wrote:
I apologize for my lack of understanding. You said the next step is
to clean it up in the actions... please clarify?
When you allocate stuff using malloc, strdup, etc. when pointer is not
used anymore, to avoid memory leak, one must apply free
Thank you for the information. However, how does this relate to the
$ problem I am having. To be more specific, the problem where
the $ of the ASSIGNMENT production ends up with the same value
of the ( expr ) production.
On Wed, Aug 4, 2010 at 9:04 AM, Hans Aberg wrote:
> On 4 Aug 2010, at 14:
On 4 Aug 2010, at 18:39, Sasan Forghani wrote:
Thank you for the information. However, how does this relate to the
$ problem I am having. To be more specific, the
problem where the $ of the ASSIGNMENT production ends
up with the same value of the ( expr ) production.
It seems you have
I think I see a few issues in your code, but without the complete source I
can't conclusively say what your problem might be.
First:
> if(strcmp($2, "+"))
Just to be sure: you know strcmp returns 0 when the strings match, right? I
ask because it looks like you're trying to convert "+" to "add",
How do you assign to $$. I've tried $$ = $1 or in the ( expr
) production $$ = $2; I always get an error along the lines
that $$ does not have a type.
On Wed, Aug 4, 2010 at 2:45 PM, Chris verBurg wrote:
>
> I think I see a few issues in your code, but without the complete source I
> can't concl
On 4 Aug 2010, at 21:48, Sasan Forghani wrote:
How do you assign to $$. I've tried $$ = $1 or in the
( expr ) production $$ = $2; I always get an error
along the lines that $$ does not have a type.
The same $$, if not declared with %token or %type. See the
Bison manual, 3.5.2.
__