Parser is now working correctly.
Added two functios to calculate inside and outside probabilities as preperation for the a* algorithm.
Example PCFG