|
From: | Hans Aberg |
Subject: | Re: Different behaviour with string and number tokens ? |
Date: | Tue, 18 Apr 2006 10:00:41 +0200 |
On 18 Apr 2006, at 09:47, Arno Wilhelm wrote:
This is one of the most FAQ here: you do not copy the string, so you just pass on a pointer to the buffer in the Flex generated lexer, which of course changes in subsequent calls to the lexer.Ahh, ok. So I could change this behaviour if I would copy the string to a buffer in flex like this:{WORD} { strcpy( yylval.str, yytext); return WORD; } Is this right ? thanks, arno
[Prev in Thread] | Current Thread | [Next in Thread] |