<div style="color:#000; font-size: 14px;font-family: arial;"><div> Dear Haskellers,<br><br>I have tried the "while language parser" tutorial on haskellwiki, but I encounter an problem I can not understand here,<br>The following is the code:<br><br>http://pastebin.com/saC9vwCn<br></div><div><br>The problem is, with the code, the parse result of "fact := a / b * c" is<br>*Main> parseString "fact := a / b * c"<br>Assign "fact" (ABinary Multiply (ABinary Divide (Var "a") (Var "b")) (Var "c"))<br>*Main> <br><br>But if I swap the order of "/" and "*" operators in aOperators(make "*" appear before "/" operator),  then the result is<br>*Main> parseString "fact := a / b * c"<br>Assign "fact" (ABinary Divide (Var "a") (ABinary Multiply (Var "b") (Var "c")))<br>*Main> <br><br>So it seems that the order of the operator will affect the parse result. What's the problem with my code?  How can I <br>make my program to produce consistent parse result.<br><br>Best Regards,<br></div><div><br></div></div><div id="spnEditorSign" name="100"><div><div>--m00nlight<br></div></div></div><div><br></div><!-- jy5ContentSuffix --><br><br><span title="neteasefooter"><span id="netease_mail_footer"><span title="neteasefooter"><span id="netease_mail_footer"><a href="#" target="_blank"></a></span></span>
</span></span>