Re: failed to run script, too many captures
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: failed to run script, too many captures
- From: Peng Zhicheng <pengzhicheng1986@...>
- Date: 2012年8月19日 20:52:03 +0800
well, your code above does not give much clue where the problem is.
the 'too many captures' error is related with Lua's pattern matching
functionality from the string library.
maybe some stack trace information would be helpful to locate the
problematic code.
making the config `LUA_MAXCAPTURES' big enough may be a workaround,
however, I think a better solution would not be making changes to
Lua but modifying your own code.
in practice, I think, we don't want so many captures. your should
re-design your code.
the match function from the string library would return all captures
onto the stack, so anyway,
we have a hard limit on LUA_MAXCAPTURES, similar to the limit on
local variables of a function.