Refactoring for later source mapping integration.
Speed test using base 36 encoded token ids.
Formatter callbacks simplified.
Big performance win: replaced some instances of str_replace for preg_replace and compile time on large files has almost halved(!).
Refactored the tracing stubs with more fine tuned regex.
Token types have their own incrementing ids now, should help with making source mapping columns more accurate and keeping the main stream small as possible.