summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--parser.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.hs b/parser.hs
index 6d8ed6d..636c04f 100644
--- a/parser.hs
+++ b/parser.hs
@@ -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