From c2680687d148820847607e13ed7100e60d94c79e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy <roberto@inf.puc-rio.br> Date: Fri, 19 Jul 2019 16:55:37 -0300 Subject: Bug: IBackCommit must remove dynamic captures, too Like a fail, a IBackCommit instruction must remove any dynamic capture made inside an 'and' pattern. (The added test for this problem needs assertions on to detect the bug.) --- lpvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lpvm.h') diff --git a/lpvm.h b/lpvm.h index 9fde967..ca625f9 100644 --- a/lpvm.h +++ b/lpvm.h @@ -27,7 +27,7 @@ typedef enum Opcode { IOpenCall, /* call rule number 'key' (must be closed to a ICall) */ ICommit, /* pop choice and jump to 'offset' */ IPartialCommit, /* update top choice to current position and jump */ - IBackCommit, /* "fails" but jump to its own 'offset' */ + IBackCommit, /* backtrack like "fail" but jump to its own 'offset' */ IFailTwice, /* pop one choice and then fail */ IFail, /* go back to saved state on choice and jump to saved offset */ IGiveup, /* internal use */ -- cgit v1.2.3-55-g6feb