[In followups, please cc the list, so that others can
follow.]
2007/11/8, Hans Aberg <haberg math.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: riribreizh gmail.com
http://riri.houbathecat.
info
http://nasgaia.org
« Frimousse en excessivité émousse son expressivité »
_______________________________________________
help-bison gnu.org http
://lists.gnu.org/mailman/listinfo/help-bison
|