Polymorphic Decoder Generator using a Hand-written CFG