"OvErboRed" <pu******@SPAMoverbored.net> wrote in message
news:Xn*****************************@127.0.0.1...
Is there a program that can help me safely rename a variable, function,
constant, macro, etc. in either C or C++? Simple search-and-replace
doesn't work, because you need something that understands the semantics, scoping
rules, and so forth. I guess I'm looking for something like cscope, but
with replacement functionality. (Even better: is there such a tool that is
vim-friendly?) Thanks in advance for any pointers.
Our DMS Software Reengineering Toolkit has a full C front
end with name and type resolution, which means it understands
all the scoping rules, etc, and can identify for each symbol,
its point of declaration and all uses. DMS can also carry
out program transformations. So this would be relatively
straightforward to implement.
It isn't an "editor" in the interactive text-string sense.
Rather, it executes predefined transforms.
Somebody has to predefine them, and we call
this customization. It'd take about a day to set
up a renaming transform.
(Our corresponding Java front end for DMS has
"rename identifier" built-in, so it is 30 seconds
to customize it for this task.)
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc.
www.semdesigns.com