Earley Parser Algorithm