changed start symbol for grammar and apply mgu to result type in type inference