help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating intelligent search 'n replace for C/C++ source?


From: lfinsto
Subject: Re: Creating intelligent search 'n replace for C/C++ source?
Date: Wed, 31 Mar 2010 09:08:33 +0200 (CEST)
User-agent: SquirrelMail/1.4.9a

> 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.

I don't think you need bison for this task.  I would probably try to solve
the problem (carefully) using Emacs-Lisp or even just normal Emacs editing
commands (in particular, `tags-query-replace').  Other possibilities would
be gawk or Flex, though I think Flex would be overkill, unless you needed
to use it often.

Another possibility might be including a header with preprocessor macros
for replacing the names of the classes.  Not one of my favorite
techniques, but it might be worth considering.

Laurence Finston


On Wed, March 31, 2010 12:48 am, Jacob Ole Juul Kolding wrote:
> 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?
>
> Best Regards
> Jacob
>
>
> _______________________________________________
> address@hidden http://lists.gnu.org/mailman/listinfo/help-bison
>







reply via email to

[Prev in Thread] Current Thread [Next in Thread]