Python Lexical Analyzer written in Java