Fleshed out the basic #DEFINE_REPEAT detection code.  Still to remove definitions and replace #REPEAT segments.