help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice needed, please


From: xelanoimis
Subject: Re: Advice needed, please
Date: Mon, 8 Jun 2009 13:37:12 -0700 (PDT)

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 the sake of more info, I installed v2.4 and managed to compile my
grammar with it. I'm not sure what is the standard procedure for correct
installing, but I copied the bison.exe and m4.exe (whatever it is) in my
working folder and then started to gather required dll-s from the net. Also
I had to copy some bison/share... folder in my c:/programfiles. I saw the
path hardcoded in bison.exe. Is this normal? Can't I have them somewhere
else?

Anyway, the new bison reported better my "--a" parse error. It was trying to
use my "decrement operator" which I only use as a statement (expanded as
a=a-1) not in expressions. I think there's no simple way around it. Or is
it? I wasn't plan to use it like this in scripts anyway.

Now I have two more questions:

1. As I said, I split the expression rule to ensure correct precedences
(like in ansi C exp_add, exp_mul, exp_shift,...). How is this affecting the
resulting parser? I guess the functionality it's the same as having a single
expression rule and the tokens arranged correctly when declared. I think the
parser is a little bigger with more rules (not really sure). But which one
is it faster?

2. Is it worth for me to use the new bison version over the old 1.24? The
output parser.cpp file was smaller before (70KB vs 100KB). Is the new one
significantly faster or it just reports errors better?

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Advice-needed%2C-please-tp23904486p23931694.html
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]