From 51ae19e37147fc8278fb9e374dab86e1ea2edc58 Mon Sep 17 00:00:00 2001 From: Marc Lasson Date: Sat, 17 Sep 2022 23:03:30 +0200 Subject: [PATCH 1/2] Break the switch, not the for --- runtime/parsing.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 */ From c8c4eed5c5829a781788d19f7b8958b106985e49 Mon Sep 17 00:00:00 2001 From: Marc Lasson Date: Sat, 17 Sep 2022 23:44:44 +0200 Subject: [PATCH 2/2] Update changes.md --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) 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