File re-alignment
- From: nivparsons <kevparsons.groups@xxxxxxxxxxxx>
- Date: Sat, 19 May 2012 09:23:03 -0700 (PDT)
I have some VHDL files thatI'd like to "tidy up".
The VHDL code has several (many) lines with "PORT MAP" in it, followed by code
such as;
fred <= fred,
george <= george,
whatever <= whatever,
nim <= nim,
etc etc
I'd like to read down to the first instance of PORT MAP, then read all the lines with <= in them, but only up to the next PORT MAP, then find the longest string before <= and rewrite all line out with that length before the <=, so all the <= line up.
Then do it all again for every occurenc of PORT MAP to the file end.
I've donea simple one that reads the whole file and realigns, but I feel this could be done better by doing in sections.
Any help most welcome, I'm only an occasional Tcl dabbler!
.
- Follow-Ups:
- Re: File re-alignment
- From: Alexandre Ferrieux
- Re: File re-alignment
- Prev by Date: Re: MyTcl, How safe
- Next by Date: Re: File re-alignment
- Previous by thread: MyTcl, How safe
- Next by thread: Re: File re-alignment
- Index(es):