Whenever I am working on programs that involve several iterations across tables I often forget about CC's "too long without yielding" error. In order to avoid having to go back and fix this I wrote this little utility

The code is available at: pastebin get Tpr5iUAH

Q: Is this loaded with os.loadAPI?
- A: To load use
dofile("yin.lua",[override pullEventRaw| true]) --os.loadAP? pffff ha

Q: Why are you overriding os.pullEventRaw?
- A: CC's has a coroutine based event system, meaning that when run os.pullEventRaw it is effectively the same thing as running coroutine.yield.

Q: How do I use this?
- A: It is very simple and only one function:

--Example case
while x<=str do
  c=str:sub(x,x)
  --Tokenization stuff...
  lc,x=c,x+1
  YIN()
end

Credit, while appreciated, is not necessary for this.