style compiler bug

Hi Gerd/Steve, I seem to have come across an anomaly in the style compiler (or I am doing something silly). The following line does not compile: ((highway=* & motorroad=yes) | highway=motorway | highway=motorway_link) & foot!=yes & foot!=designated & foot!=permissive { add mkgmap:foot=no } But this variant compiles: (highway=motorway | highway=motorway_link | (highway=* & motorroad=yes)) & foot!=yes & foot!=designated & foot!=permissive { add mkgmap:foot=no } And so does this one: ((highway=* & motorroad=yes) | highway=motorway | highway=motorway_link) & (foot=yes | foot=designated | foot=permissive) This is the error message: Error in style: Error: (inc/access:6): Invalid rule expression: ((($highway=*&($motorroad='yes'))|(($highway='motorway')|($highway='motorway _link')))&($foot!=yes&($foot!=designated&$foot!=permissive))) Changing the != operators to = allows it to compile, so most likely a mishandling of the ! operator. Any ideas what is wrong? Mike

Hi Mike
The following line does not compile:
((highway=* & motorroad=yes) | highway=motorway | highway=motorway_link) & foot!=yes & foot!=designated & foot!=permissive { add mkgmap:foot=no }
Yes, you've found a bug, thanks for reporting it. As you discovered, if you re-arrange the expression, the error goes away. The style compiler is supposed to re-arrange the terms itself, which is not working in this case. I am looking into a fix now. ..Steve

Hi I've found a fix, attached, and which I shall commit shortly. Thanks again for reporting this. ..Steve
participants (2)
-
Mike Baggaley
-
Steve Ratcliffe