Syntax analysis for Miranda like parser