Switched declarations to use a switch statement, as well as a couple of other minor changes in the lexer.
No need for a separate object to lock on.
By changing just one line, I have dropped parse time by another 2000ms.
Merge pull request #39 from Orvid/master

Who doesn't like speed?