working version of psl parser
refactored, added general case functionality
initial commit