title: generating c++ refactoring script
body: <p>I have to perform refactoring of a medium size code block (&lt; 200K LOC). The scope is pretty moderate: rename some classes, move a few nested definitions up and down the class hierarchy, remove unused stuff.</p>
  
  <p>It would be pretty straightforward to do it by hand but we will have to pick up bug fixes from the older code base for one or two years, and the project will change at least half of lines in the existing code.</p>
  
  <p>So, I am planning to express the changes as a sequence of indent (supposedly astyle), sed script, and another indent.</p>
  
  <p>My plans are: do conversion by hand, then develop the sed script that will yeld the same result. The former part is pretty clear, but developing bit sed script by hand does not seem particularly appealing but I do not have any better idea.</p>
  
  <p>Please, help.</p>