Working implementation of the A* parse algorithm. Wooohoo! \o/