[GRASS5] PATCH: sql expression parser

Glynn Clements glynn at gclements.plus.com
Sat Jun 11 00:18:25 EDT 2005


Daniel Calvelo Aros wrote:

> Earlier, I queried about sql expressions in where clauses. Glynn proposed a
> fix for that using additional rules to cope with operator precedence. I attach
> a patch that uses the precedence directives available to bison. This allows
> for eg:
> 
> select cat from blah where (col1/(col2+col3)-col4)=1
> 
> However, I'm unsure about %left and ilk directives in older yaccs; could
> anybody confirm this works in non-GNU yaccs? If so, please test this patch, it
> is a bugfix actually.

Can you try the patch I have sent in response to your previous
message? It explicitly refactors the grammar to use multiple "levels"
of expression rather than relying upon yacc to handle of precedence
and fixity.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list