MMM Mode is an add-on package for emacs that enables the user to edit different parts of a file in different major modes. It is well suited for editing embedded code and code-generating code.
The development is hosted at GitHub now: https://github.com/purcell/mmm-mode
Please report any issues there.