New parser written in python using the ply parser generator. Replacing the bison one which needed a c compiler.

Add unit tests.