aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Queiroz <sqmedeiros@gmail.com>2016-09-21 10:07:34 -0300
committerSergio Queiroz <sqmedeiros@gmail.com>2016-09-21 10:07:34 -0300
commitbeb03a70df23225b5db7d86f2ea799e33d7dd252 (patch)
tree9a875091161486471dc3c87126a2ba7cc6973a63
parenta9c5a38994074d2c9c5da4cf081c4ca9fa8b3271 (diff)
downloadlpeglabel-beb03a70df23225b5db7d86f2ea799e33d7dd252.tar.gz
lpeglabel-beb03a70df23225b5db7d86f2ea799e33d7dd252.tar.bz2
lpeglabel-beb03a70df23225b5db7d86f2ea799e33d7dd252.zip
Fixing a bug in lpvm.c (now the tests passed)
-rw-r--r--lpvm.c4
-rw-r--r--relabel.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/lpvm.c b/lpvm.c
index 44975a1..e8ff287 100644
--- a/lpvm.c
+++ b/lpvm.c
@@ -360,8 +360,8 @@ const char *match (lua_State *L, const char *o, const char *s, const char *e,
360 stack++; 360 stack++;
361 } 361 }
362 if (ndyncap > 0) /* is there matchtime captures? */ 362 if (ndyncap > 0) /* is there matchtime captures? */
363 ndyncap -= removedyncap(L, capture, stack->caplevel, captop); 363 ndyncap -= removedyncap(L, capture, pstack->caplevel, captop);
364 captop = stack->caplevel; 364 captop = pstack->caplevel;
365 p = pstack->p; 365 p = pstack->p;
366 continue; 366 continue;
367 } 367 }
diff --git a/relabel.lua b/relabel.lua
index ff2e486..0e7195e 100644
--- a/relabel.lua
+++ b/relabel.lua
@@ -6,7 +6,7 @@ local pcall = pcall
6local setmetatable = setmetatable 6local setmetatable = setmetatable
7local unpack, tinsert, concat = table.unpack or unpack, table.insert, table.concat 7local unpack, tinsert, concat = table.unpack or unpack, table.insert, table.concat
8local rep = string.rep 8local rep = string.rep
9local m = require"lpeglabel" 9local m = require"lpeglabelrec"
10 10
11-- 'm' will be used to parse expressions, and 'mm' will be used to 11-- 'm' will be used to parse expressions, and 'mm' will be used to
12-- create expressions; that is, 're' runs on 'm', creating patterns 12-- create expressions; that is, 're' runs on 'm', creating patterns