Modified Logic parser