$1 is not $1 but $1+$2

2005-07-30 Thread Gianni Pucciani
Hi all, I'm quite new in using bison/flex and I'm getting crazy doing a simple parser for a configuration file. The problem is with these few rules (I wouldn't bored you with the whole problem explanation and I guess I can skip it): linedbfilter: dbname { printf("DBNAME is (%s)\n",$1); } |

Re: $1 is not $1 but $1+$2

2005-07-30 Thread Hans Aberg
On 29 Jul 2005, at 10:53, Gianni Pucciani wrote: the value in $1 is not that retrieved by the rule dbname. What happens is that in that rule, the value of $1 is not "$$ of dbname rule" but $1 + $2 , that is the two strings "dbname tablelist" concatenated. In other words, in the passage fro

Which one is "better" ?

2005-07-30 Thread Baldurien (club internet)
Hello I have a grammar to do for my self, and since this grammar add the same expression than the one we could have in a SQL query language, I'm wondering which grammar is better in term of performance. My first one is the classical "one production per precedence" : start: VARSTART e_no_p