change construction of ParserKeyword objects to the factory paradigm

this makes it more explicit what the object is supposed to represent.