added parse function for propositional logic