aboutsummaryrefslogtreecommitdiff
path: root/lpvm.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-19 16:55:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-19 16:55:37 -0300
commitc2680687d148820847607e13ed7100e60d94c79e (patch)
tree4a1bdc70a0f56bb1fa6dadebc90f99bb903bb548 /lpvm.h
parentec24caa52eebabbba29d96875c8c62395849b5e2 (diff)
downloadlpeg-c2680687d148820847607e13ed7100e60d94c79e.tar.gz
lpeg-c2680687d148820847607e13ed7100e60d94c79e.tar.bz2
lpeg-c2680687d148820847607e13ed7100e60d94c79e.zip
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.)
Diffstat (limited to 'lpvm.h')
-rw-r--r--lpvm.h2
1 files changed, 1 insertions, 1 deletions
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 {
27 IOpenCall, /* call rule number 'key' (must be closed to a ICall) */ 27 IOpenCall, /* call rule number 'key' (must be closed to a ICall) */
28 ICommit, /* pop choice and jump to 'offset' */ 28 ICommit, /* pop choice and jump to 'offset' */
29 IPartialCommit, /* update top choice to current position and jump */ 29 IPartialCommit, /* update top choice to current position and jump */
30 IBackCommit, /* "fails" but jump to its own 'offset' */ 30 IBackCommit, /* backtrack like "fail" but jump to its own 'offset' */
31 IFailTwice, /* pop one choice and then fail */ 31 IFailTwice, /* pop one choice and then fail */
32 IFail, /* go back to saved state on choice and jump to saved offset */ 32 IFail, /* go back to saved state on choice and jump to saved offset */
33 IGiveup, /* internal use */ 33 IGiveup, /* internal use */