Re: Advice needed, please

2009-06-08 Thread Hans Aberg
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

Re: Advice needed, please

2009-06-08 Thread xelanoimis
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

Re: Advice needed, please

2009-06-08 Thread Hans Aberg
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

Re: Advice needed, please

2009-06-08 Thread xelanoimis
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

Re: Advice needed, please

2009-06-08 Thread dummy Taurus
> > 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

Re: Advice needed, please

2009-06-08 Thread Hans Aberg
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

Re: Advice needed, please

2009-06-08 Thread xelanoimis
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

Re: Advice needed, please

2009-06-08 Thread Hans Aberg
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

Re: Advice needed, please

2009-06-07 Thread xelanoimis
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 reduce them further? I uploaded the output f

Re: Advice needed, please

2009-06-07 Thread dummy Taurus
On Sun, Jun 7, 2009 at 6:04 AM, Hans Aberg wrote: > On 6 Jun 2009, at 23:29, xelanoimis wrote: > > I'm updating my scripting language and I need some help from someone more >> experienced with bison who would like to have a look at my grammar. As it >> is >> now it works fine, but I just want to

Re: Advice needed, please

2009-06-06 Thread Hans Aberg
On 6 Jun 2009, at 23:29, xelanoimis wrote: I'm updating my scripting language and I need some help from someone more experienced with bison who would like to have a look at my grammar. As it is now it works fine, but I just want to make sure I didn't do any bad things in there. Or if there'