<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Hi again,<br><br></div>following my last email I tried to simplify the rule and still get an error. It seems that<br>there are problems with parsing the rules. Here are two very simple rules that both (should) mean<br>
the same thing:<br><br>$ low {(depth=verylow & velocity=verylow) | (depth=low & velocity=verylow) | (depth=verylow & velocity=low) | (depth=verylow & velocity=medium) | (depth=veryhigh & velocity=medium) | (depth=high & velocity=high)}<br>
<br>$ low {(depth=verylow & velocity=verylow) | ((depth=low & 
velocity=verylow) | ((depth=verylow & velocity=low) | ((depth=verylow
 & velocity=medium) | ((depth=veryhigh & velocity=medium) | 
(depth=high & velocity=high))))}<br><br></div>But for both I get an error when they're checked by r.fuzzy.system.<br></div>What I don't know is how to use the or-operator '|' correctly multiple times. E.g. for "either A or B or C".<br>
</div>How do I need to set the parentheses correctly so that the rules are parsed correctly. As I don't understand<br></div>the code in <a href="https://svn.osgeo.org/grass/grass-addons/grass6/raster/r.fuzzy.system/rule_parser.c">https://svn.osgeo.org/grass/grass-addons/grass6/raster/r.fuzzy.system/rule_parser.c</a><br>
</div>I am not sure what is happening there. If it is just an error that is not influencing the fuzzy output, can<br>that be somehow bypassed as I thought the rules are correct.<br><br></div>Hopefully anybody can help here!<br>
</div><br></div>Best regards,<br></div>Johannes<br><div><div><div><div><div><div><div><div><br><br><div><div><div><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Johannes Radinger</b> <span dir="ltr"><<a href="mailto:johannesradinger@gmail.com">johannesradinger@gmail.com</a>></span><br>
Date: Tue, May 7, 2013 at 11:35 AM<br>Subject: r.fuzzy.sytem rule file syntax error<br>To: GRASS user list <<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>><br><br><br><div dir="ltr"><div>
Hi,<br>I try to use the r.fuzzy.system tool but my rules do not work. The error seems to be related<br>with a line in the rule definition file. The line is:<br><br>$ low {(depth=veryhigh & (velocity=medium | velocity=high)) | ((depth=high & (velocity=high | velocity=veryhigh)) | ((depth=medium & velocity=veryhigh) | (depth=low & velocity=verylow)))}<br>

<br>ERROR: line 2 Syntax error near < )><br><br></div><div>However that does not give me the real info about the problem. I checked several times the number of opening and closing braces")" but somehow I can't find the syntax error. Probably I am just code-blind :)<br>

<br></div><div>Any suggestions? Is there any possibility to check the syntax resp. to pin down where excaclty the problem is? <br><span class=""><font color="#888888"><br></font></span></div><span class=""><font color="#888888"><div>
/johannes<br></div></font></span></div>
</div><br></div></div></div></div></div></div></div></div></div></div></div></div>