
Dear Haskellers, I have tried the "while language parser" tutorial on haskellwiki, but I encounter an problem I can not understand here, The following is the code: http://pastebin.com/saC9vwCn The problem is, with the code, the parse result of "fact := a / b * c" is *Main> parseString "fact := a / b * c" Assign "fact" (ABinary Multiply (ABinary Divide (Var "a") (Var "b")) (Var "c")) *Main> But if I swap the order of "/" and "*" operators in aOperators(make "*" appear before "/" operator), then the result is *Main> parseString "fact := a / b * c" Assign "fact" (ABinary Divide (Var "a") (ABinary Multiply (Var "b") (Var "c"))) *Main> So it seems that the order of the operator will affect the parse result. What's the problem with my code? How can I make my program to produce consistent parse result. Best Regards, --m00nlight