List Info

Thread: Re: token extraction problem within a rule




Re: token extraction problem within a rule
country flaguser name
Sweden
2007-11-08 07:19:00
[In followups, please cc the list, so that others can
follow.]

2007/11/8, Hans Aberg <habergmath.su.se>:
> On 8 Nov 2007, at 10:49, Richard Gill wrote:
>
>> I started learning flex/bison some days ago to
write a parser. Nearly
>> all my parser works well, but I've a problem with a
rule which  
>> matches
>> well but gives a wrong result in $n. I checked the
lexer (flex) did
>> extract right token.
>
> There is a quite common newbie error to not copy the
token that the
> Flex generated lexer points. It just points to a
buffer, temporarily
> '' terminated, and changed back. Bison then makes
several calls,
> and if given just a pointer in the buffer, there will
be some jumble.
>
>    Hans Aberg

Hmmm, I see what you mean; sure it's something like that.
In fact, I'm just creating the parser, and debug it without
using the
data. With a real process behind, I guess I wouldn't had
this problem.
Thanks to have pointed  that to me!

Regards

-- 
Richard 'riri' GILL
jabber: riribreizhgmail.com
http://riri.houbathecat.
info
http://nasgaia.org
« Frimousse en excessivité émousse son expressivité »


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

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )