Java Implementation of a PCKY Parsing algorithm