calculator.c
branchcalculator-experiment
changeset 820 fd001ff71c65
parent 818 6f893a2224d8
child 821 ecf9f8157ada
--- a/calculator.c	Mon Feb 08 03:59:18 2010 -0500
+++ b/calculator.c	Mon Feb 08 04:29:05 2010 -0500
@@ -526,7 +526,7 @@
         // !!! FIXME:  when a rule reduces down later.
         TokenData token = { ctx.token, ctx.tokenlen };
         ParseCalculator(pParser, convert_to_lemon_token(&ctx), token, &ctx);
-    } while (ctx.tokenval != TOKEN_EOI);
+    } while ((!ctx.isfail) && (ctx.tokenval != TOKEN_EOI));
     ParseCalculatorFree(pParser, f, d);
 }