Fix loop on number UNDEFINED case

So a quick fix was in my Rules check, I left it as the global state equals Rules instead of result equals Rules.  The main commit problem was the current character was never changing but the state was.
Merge pull request #3 from seraphrunner/addtokens

Fix loop on number UNDEFINED case