configurability

Suggestions on how to make a configurable parser.

I want to build a parser for a C like language. The interesting aspect about it is that I want to build it in such a way that someone who has access to the source can easily modified it to extend the language (a new expression type of instance) with the extensions being runtime configurable (they can be turned on and off). My current in...

Is it possible to make creation of different classes controllable by configurations?

Is it possible at all to control the creation of different classes from configurations? Say, I have a function which does this which is hard-coded: BaseClass* getClassObject(int type) { switch (type) { case 1: return new DerivedClass1(); case 2: return new DerivedClass2(); default: return 0; ...