diff --git a/CHANGES.md b/CHANGES.md index 8cef181266..e62612c6e4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ ## Bug fixes * Compiler: fix rewriter bug in share_constant (fix #1247) +* Runtime: fix ocamlyacc parse engine (#1307) * Runtime: fix Out_channel.is_buffered, set_buffered * Runtime: fix format wrt alternative * Runtime: fix Digest.channel diff --git a/runtime/parsing.js b/runtime/parsing.js index 1bcee7e749..6a3ce1b948 100644 --- a/runtime/parsing.js +++ b/runtime/parsing.js @@ -96,7 +96,7 @@ function caml_parse_engine(tables, env, cmd, arg) var errflag = env[env_errflag]; exit:for (;;) { - switch(cmd) { + next:switch(cmd) { case 0://START: state = 0; errflag = 0; @@ -149,7 +149,7 @@ function caml_parse_engine(tables, env, cmd, arg) n2 = n1 + ERRCODE; if (n1 != 0 && n2 >= 0 && n2 <= tables[tbl_tablesize] && tables.check[n2] == ERRCODE) { - cmd = shift_recover; break; + cmd = shift_recover; break next; } else { if (sp <= env[env_stackbase]) return RAISE_PARSE_ERROR; /* The ML code raises Parse_error */