making parsing actions polymorphic to get rid of the scattered switch
statements