[GRASS5] PATCH: sql expression parser

Daniel Calvelo Aros dcalvelo at minag.gob.pe
Wed Jun 15 00:08:53 EDT 2005


Glynn Clements on Wed, 15 Jun 2005 04:24:40 +0100:
>
> The SQL interpreter in the DBF driver doesn't have a negation
> operator.
> 
> I thought about parsing -E as a subtraction (0 - E), although I'm not
> sure whether there's something I'm overlooking.

I'd rather use (-1)*E, which is also within the grammar, and I *think* works
better wrt precedence rules and allows a*-b. I might be overlooking stg also.
What does e.g. octave do? BTW I'd use yacc's %prec, but that's just laziness
of course.

Daniel.




More information about the grass-dev mailing list