@dc42 Sounds great thanks.
I don't think the number of overridden GCODEs is likely ever to be a very long list - so maybe a lookup list could work too - perhaps with some sort of extra M command in the config.g or start gcode in the slicer to register the overrides.
In the meantime I think I will alter my post processor to be more generic and do more or less the same thing.
i.e. Look for some sort of override registration M command (M802 for example) in the gcode stream, and then use that info to then override any relevant G/M/T commands later in the stream into .x equivalents.