Merge pull request #1 from seraphrunner/addtokens

Addtokens
Merge pull request #2 from seraphrunner/addtokens

Addtokens
Fix infinate loop bug

I had to set result equal to getNextState and retrun result for the recursion to work.  I also fixed some test cases for ID and UNDEFINED.
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.