[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %left is not working
From: |
Hans Aberg |
Subject: |
Re: %left is not working |
Date: |
Tue, 3 Aug 2010 22:36:57 +0200 |
[Please keep the cc to the list so that others may follow.]
On 3 Aug 2010, at 22:26, Sasan Forghani wrote:
Thank you for the response. However, I don't understand your second
statement about properly allocating. In the Bison script, I have
IDENTIFIER specified as type <blIdentifier>. And in the ( expr )
production, expr should have its value allocated by the IDENTIFIER
production further down. And that is getting allocated because I
also have a strcpy at the end of the IDENTIFIER production. Can you
please explain further. Thanks.
A common error is not allocating the buffers correctly. If the lexer
is generated by Flex, it just gives a pointer to the identified text
which must be copied over to a newly created buffer, before passed to
the parser.
SImilarly, in the parser, the $$ value must be allocated a buffer if
it is not just a point to a $k value.
I could see in your code how you are doing. So just mentioned it just
in case.
- %left is not working, Sasan Forghani, 2010/08/03
- Re: %left is not working, Hans Aberg, 2010/08/03
- Message not available
- Re: %left is not working,
Hans Aberg <=
- Message not available
- Re: %left is not working, Hans Aberg, 2010/08/03
- Re: %left is not working, Sasan Forghani, 2010/08/04
- Re: %left is not working, Hans Aberg, 2010/08/04
- Re: %left is not working, Sasan Forghani, 2010/08/04
- Re: %left is not working, Hans Aberg, 2010/08/04
- Re: %left is not working, Chris verBurg, 2010/08/04
- Re: %left is not working, Sasan Forghani, 2010/08/04
- Re: %left is not working, Hans Aberg, 2010/08/04
- Re: %left is not working, Sasan Forghani, 2010/08/05
- Re: %left is not working, Hans Aberg, 2010/08/05