Le 31 mars 2010 à 00:48, Jacob Ole Juul Kolding a écrit : > Hello List > > I'm a total newb regarding all things bison/yacc but I think it's the tool > for my current problem at hand. > I have a rather large code base written in C/C++ where I need to replace some > fundamental classes > and all references to function call from other classes/functions. > > All I need is a program that can parse the source and replace all instances of > classes and functions including arguments based on a simple 2,3 column text > file. > > Can anyone point me to relevant examples or share ideas on the subject?
I'm afraid there is no good solution for this. I mean, afaik, there is no IDE which is able to perform "intelligent" substitutions in C++, as it would require being able to perform full analysis of the code, detect collisions, etc. It exists for simpler languages (from the syntactic point of view) such as Java, but for C++, you might have to simply perform substitution with, say perl, something like perl -pi.bak -e 's{\bMyFormerClassName\b}{MyNewClassName}g' *.{cc,hh} I heard about a powerful environment for C++ under Emacs, but I forgot its name. [looking for it...] It might be http://cedet.sourceforge.net/semantic.shtml. That page reports that "David Ponce has ported Bison to Emacs Lisp". I don't know what that means, but I'm curious :) _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison