Parse regular language a^n b^m.