completed predictive parsing using Java
refactored predictive parsing