|
于 2012-8-17 23:40, Maha Akkari 写道:
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. |