--- toke.c.orig	2007-12-18 02:47:08.000000000 -0800
+++ toke.c	2009-05-13 21:21:32.000000000 -0700
@@ -692,6 +692,7 @@
 #else
     parser->nexttoke = 0;
 #endif
+    parser->error_count = oparser ? oparser->error_count : 0;
     parser->copline = NOLINE;
     parser->lex_state = LEX_NORMAL;
     parser->expect = XSTATE;
