Re: parser generator
- From: "Rich Ackerson" <richsa@xxxxxxxxx>
- Date: Thu, 29 Sep 2005 12:14:48 -0400
Charles,
Two options come to mind depending upon your ultimate goal. Obviously, you
have source code you want refactored. If the modified code is your true end
goal and you don't really care how you get there, I can recommend a very
powerful grepping tool, PowerGrep (www.powergrep.com/), that will allow you
to search and modify your source files. IMO, it is a rock solid product
with excellent support.
However, if you are actually looking for a utility to keep on hand for
future use and you want it to work in a very customize manner, developing a
utility is probably your best bet. I believe you are a CodeRush user. If
so, have you thought about writing a CodeRush plug-in? CR has the ability
to parse your code, use regular expressions, insert and update lines of
code, etc. Pretty much everything you would need.
HTH
Rich
"Charles McAllister" <charles@xxxxxxxxxxx> wrote in message
news:433c09bb$1@xxxxxxxxxxxxxxxxxxxxxxxxx
> i need to write a utility to refactor some code.
> here's what i need to do:
>
> for every unit used in a project...
> 1. find a procedure/function declaration
> 2. search within the body of that proc for a statement matching a reg
expression (or simple Pos
> function call will do)
> 3. if that procedure matches the search, then add a variable declaration
to the local variable list
> section of that procedure.
> 4. repeat to 1.
>
> I started to use CodeLens to write this utility, but CodeLens lacks
certain features. for one, it
> doesn't appear to parse any of the body of the procedure so that i can
know the starting and ending
> positions of the body of the procedure (e.g. begin/end pair positions).
>
> Any help is greatly appreciated!
.
- Follow-Ups:
- Re: parser generator
- From: Charles McAllister
- Re: parser generator
- References:
- parser generator
- From: Charles McAllister
- parser generator
- Prev by Date: Re: version Control
- Next by Date: Re: version Control
- Previous by thread: parser generator
- Next by thread: Re: parser generator
- Index(es):