Advice needed, please

2009-06-06 Thread xelanoimis
Hello, 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's a way to "optimize" it, make the result

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: about counting the times of 'recursion'

2009-06-07 Thread xelanoimis
Just a thought on this, in case you don't need only a 1:1 parallel assignment: I wanted to support this too, along with returning more than one value, like LUA does. It is pretty tricky if you don't know at compile time how many values are expected or returned. Even LUA messes up these assigns i

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 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 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