PHP OOP Lexer, Parser, StateMachine