473,405 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Program to rename C/C++ symbols (variables/functions)

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.
Nov 14 '05 #1
3 4612
OvErboRed wrote in news:Xn*****************************@127.0.0.1 in
comp.lang.c++:
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.


google for: refactoring browser C++

Rob.
--
http://www.victim-prime.dsl.pipex.com/
Nov 14 '05 #2
I was able to find Xrefactory for Emacs and CDT for Eclipse (neither of
which I use), and nothing that was stand-alone.

Rob Williscroft <rt*@freenet.co.uk> wrote in
news:Xn**********************************@130.133. 1.4:
google for: refactoring browser C++

Rob.


Nov 14 '05 #3
"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

Nov 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Torbak | last post by:
I got some question about symbols in libraries ... In libraries, there is public symbols and "not public" symbols (private, static)... In C when we use the "static" keyword on the declaration of...
3
by: OvErboRed | last post by:
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...
7
by: Tom | last post by:
I'm having a problem using a path with spaces as a parameter to os.rename() in a program on WinXP. This works fine at the command line (where the folder "c:\aa bb" exists) > os.rename( "c\aa...
47
by: Pierre Barbier de Reuille | last post by:
Please, note that I am entirely open for every points on this proposal (which I do not dare yet to call PEP). Abstract ======== This proposal suggests to add symbols into Python. Symbols...
4
by: Herman.Schultz | last post by:
Hi, I have a c++ program, and I would like to use a c library (e.g. curl library for http). Where are the things i need to do to use a c library in a c++ program? I read some articles...
2
by: tanichka | last post by:
Hello you helpful folk! Please look at my script and tell me what I am doing wrong! I am cleaning the names of my music files from unnecessary symbols, and the cleaning works fine, however the perl...
7
by: Bob Altman | last post by:
Using VS 2008 SP1, is there a way to rename a CSS style and all of the references to that style (short of doing a global find-and-replace in the code)? You'd think that the Manage Styles and Apply...
4
by: sinbad | last post by:
how can i write a program, which should accept input as NAME of a variable in the program and print it's value.Is this possible. for example. int main () { int x,y,z; x = 10; y = 20; z = 30;
10
by: Ali Shirvani | last post by:
Hi all, I want to get list of all functions that are defined in the current C code, for example if I have the code below: int f(int c, int d){ int a = 10; int b = 12; return c+a; }
1
by: swapniliit2222 | last post by:
Hi I have a little problem, I have a source code which need to be compiled in two diffrent ways With some diffrent # defines in both cases. And I need to link both library to link to the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.