thesis: add earley pseudocode