#Earley Algorithm for Non-Deterministic CFG Parsing in Python
$ python earley.py "3+2*1+4"
in case it can parse the input, it outputs the Abstract Syntax Tree:
\Tree [.G [.S [.S [.S [.M [.T [.3 ]]]] [.+ ] [.M [.M [.T [.2 ]]] [.* ] [.T [.1 ]]]] [.+ ] [.M [.T [.4 ]]]] [.$ ]]