diff options
-rw-r--r-- | parser.hs | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -157,7 +157,11 @@ pinfixoperator (plus,minus) pterm sumconstr negconstr plusopt noneg = do pmoreterms thissum +++ return thissum psum :: Parser AST -psum = pinfixoperator ('+','-') pproduct Sum Negative False False +psum = do + poptws + res <- pinfixoperator ('+','-') pproduct Sum Negative False False + poptws + return res pproduct :: Parser AST pproduct = pinfixoperator ('*','/') pfactor Product Reciprocal True True |