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:13, Sasan Forghani wrote:

Yes the lexer is generated by flex. In flex script, I have the actions:

{addop} {yylval.blOperator = strdup(yytext); return BL_ADDOP;}
{identifier} {yylval.blIdentifier = strdup(yytext); return BL_IDENTIFIER;}

How do I allocate $$ a buffer? Each time I try $$ = $<blIdentifier># I get an error that states $$ does not have a type.

Finally,  please clarify keep the cc to the list.

Thanks again for the response.



_______________________________________________
help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Reply via email to