[Please keep the cc to Help-Bison so others can follow.
It is simple to generate list of arbitrary length on both sides, and
check that they agree in the actions. The grammatical capabilities are
rather limited, so extend it by resolving in the actions.
Hans
On 8 Jun 2009, at 01:26, Max
On 8 Jun 2009, at 00:44, xelanoimis wrote:
Thanks for the answers, but I'm still stuck.
I set a few more tokens to %left and reduced the conflicts to 84.
I think some of them may be caused by the unary operators.
Can you please give me an example on my grammar about what should I do
exactly to r
Hans Aberg wrote:
>
> The Bison manual calculator example shows how to do that.
>
Yeah, I used a special token like that, to force the precedence of that
particular rule. I'm not sure why didn't work.
I think I'll have to write the grammar better, more like the ansi c one,
with separate rule f
On 8 Jun 2009, at 13:10, xelanoimis wrote:
The Bison manual calculator example shows how to do that.
Yeah, I used a special token like that, to force the precedence of
that
particular rule. I'm not sure why didn't work.
I think I'll have to write the grammar better, more like the ansi c
on
>
> I use --verbose in the command line. I hope it's the same as %error-verbose
> 'cause this one didn't worked.
Use %error-verbose, you can get the more specific error message in your
yyerror.
This is documented in section 4.3 of bison manual.
Option --verbose overrides directive %verbose, it out
All right, I changed the grammar to be more like this ansi c here:
http://www.quut.com/c/ANSI-C-grammar-y.html
And I got rid of the conflicts :) All except the "if else" which I
understand is OK to have.
The issue with the %%error_verbose was that I had bison v1.24 which didn't
support it.
For
On 8 Jun 2009, at 22:37, xelanoimis wrote:
All right, I changed the grammar to be more like this ansi c here:
http://www.quut.com/c/ANSI-C-grammar-y.html
And I got rid of the conflicts :) All except the "if else" which I
understand is OK to have.
If it is the dangling "else", you can get rid o
The %nonassoc worked fine.
I run bison on WindowsXP, but didn't compile it myself. I downloadable the
binaries. I guess it depends then how they were compiled. Still the ancient
v1.2 needed only bison.exe. Now I have 2 exe, 3 dll, and a bunch of scripts
that are all pretty cryptic to me. But I'm
On 9 Jun 2009, at 00:22, xelanoimis wrote:
I do use Flex and I was also wondering how much faster the -f option
is. The
lexer size jumped from 51KB to 219KB. I don't have yet a big script
to test
on so I wonder if you have any idea if it's worth using.
The best way to know is always some k