as noted above educated gives a module that lets you diff with context My question is more about what your real problem is.
What do you mean by pull apart? are you trying to write some translation machine to convert to a new template file? Trying to standardize the templates down to a core template with diffs? If you are trying to do the latter to minimize your work you need to be careful as diffs _are_ context sensitive and making a change in the master template can (and if customizations are high) will make the context portion of your diffs invalid. Let me know what the real problem is that you are trying to solve -- there may be a better way.