Python Implementation of the Earley Parser