Parser classes copied from TextBuddy