PHP implementation of Lexical Analyzer