diff options
author | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-07-22 16:41:02 -0300 |
---|---|---|
committer | Sergio Queiroz <sqmedeiros@gmail.com> | 2016-07-22 16:41:02 -0300 |
commit | 7757aac333c5a37181f942d5f20223023cbdc207 (patch) | |
tree | 71f484b11c7af36050c5576d6794bf8092509e1c | |
parent | abb26cdfd3d44e7b10ec001f2afb980616c71573 (diff) | |
download | lpeglabel-7757aac333c5a37181f942d5f20223023cbdc207.tar.gz lpeglabel-7757aac333c5a37181f942d5f20223023cbdc207.tar.bz2 lpeglabel-7757aac333c5a37181f942d5f20223023cbdc207.zip |
Removing "pk" from lpvm.c
-rw-r--r-- | lpvm.c | 7 |
1 files changed, 0 insertions, 7 deletions
@@ -171,7 +171,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
171 | int captop = 0; /* point to first empty slot in captures */ | 171 | int captop = 0; /* point to first empty slot in captures */ |
172 | int ndyncap = 0; /* number of dynamic captures (in Lua stack) */ | 172 | int ndyncap = 0; /* number of dynamic captures (in Lua stack) */ |
173 | const Instruction *p = op; /* current instruction */ | 173 | const Instruction *p = op; /* current instruction */ |
174 | const Instruction *pk = NULL; /* resume instruction */ | ||
175 | Labelset lsfail; | 174 | Labelset lsfail; |
176 | setlabelfail(&lsfail); | 175 | setlabelfail(&lsfail); |
177 | stack->p = &giveup; stack->s = s; stack->ls = &lsfail; stack->caplevel = 0; stack++; /* labeled failure */ | 176 | stack->p = &giveup; stack->s = s; stack->ls = &lsfail; stack->caplevel = 0; stack++; /* labeled failure */ |
@@ -205,7 +204,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
205 | if (s < e) { p++; s++; } | 204 | if (s < e) { p++; s++; } |
206 | else { | 205 | else { |
207 | *labelf = LFAIL; /* labeled failure */ | 206 | *labelf = LFAIL; /* labeled failure */ |
208 | pk = p + 1; | ||
209 | *sfail = s; | 207 | *sfail = s; |
210 | goto fail; | 208 | goto fail; |
211 | } | 209 | } |
@@ -220,7 +218,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
220 | if ((byte)*s == p->i.aux && s < e) { p++; s++; } | 218 | if ((byte)*s == p->i.aux && s < e) { p++; s++; } |
221 | else { | 219 | else { |
222 | *labelf = LFAIL; /* labeled failure */ | 220 | *labelf = LFAIL; /* labeled failure */ |
223 | pk = p + 1; | ||
224 | *sfail = s; | 221 | *sfail = s; |
225 | goto fail; | 222 | goto fail; |
226 | } | 223 | } |
@@ -237,7 +234,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
237 | { p += CHARSETINSTSIZE; s++; } | 234 | { p += CHARSETINSTSIZE; s++; } |
238 | else { | 235 | else { |
239 | *labelf = LFAIL; /* labeled failure */ | 236 | *labelf = LFAIL; /* labeled failure */ |
240 | pk = p + CHARSETINSTSIZE; | ||
241 | *sfail = s; | 237 | *sfail = s; |
242 | goto fail; | 238 | goto fail; |
243 | } | 239 | } |
@@ -254,7 +250,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
254 | int n = p->i.aux; | 250 | int n = p->i.aux; |
255 | if (n > s - o) { | 251 | if (n > s - o) { |
256 | *labelf = LFAIL; /* labeled failure */ | 252 | *labelf = LFAIL; /* labeled failure */ |
257 | pk = p + 1; | ||
258 | *sfail = s; | 253 | *sfail = s; |
259 | goto fail; | 254 | goto fail; |
260 | } | 255 | } |
@@ -362,7 +357,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
362 | /* go through */ | 357 | /* go through */ |
363 | case IFail: | 358 | case IFail: |
364 | *labelf = LFAIL; /* labeled failure */ | 359 | *labelf = LFAIL; /* labeled failure */ |
365 | pk = NULL; | ||
366 | *sfail = s; | 360 | *sfail = s; |
367 | fail: { /* pattern failed: try to backtrack */ | 361 | fail: { /* pattern failed: try to backtrack */ |
368 | const Labelset *auxlab = NULL; | 362 | const Labelset *auxlab = NULL; |
@@ -391,7 +385,6 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e, | |||
391 | if (res == -1) { /* fail? */ | 385 | if (res == -1) { /* fail? */ |
392 | *labelf = LFAIL; /* labeled failure */ | 386 | *labelf = LFAIL; /* labeled failure */ |
393 | *sfail = (const char *) s; /* TODO: ??? */ | 387 | *sfail = (const char *) s; /* TODO: ??? */ |
394 | pk = NULL; | ||
395 | goto fail; | 388 | goto fail; |
396 | } | 389 | } |
397 | s = o + res; /* else update current position */ | 390 | s = o + res; /* else update current position */ |