[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String concatenation?
From: |
Hans Aberg |
Subject: |
Re: String concatenation? |
Date: |
Tue, 3 Jun 2003 18:34:25 +0200 |
At 10:46 -0500 2003/06/03, Kevin Milner wrote:
[Please keep Cc to Help Bison list.]
>So in the scanner I should just do something like this, right?
>
>{ yylval.strval = strdup(yytext); .... }
Right.
>So what happens to this string at a later time? Do I need to free it in the
>parser?
I use C++, which does that automatically via a C++ sequence container (like
std::deque) used as parser stack.
Under C, you need to clean up the memory by hand, or using %destructor or
something.
Hans Aberg