At 22:54 14 01 2002, Ronald J Kimball wrote:
>On Mon, Jan 14, 2002 at 07:32:15PM -0500, Aaron D. Marasco wrote:
> >
> > Please explain if you are doing anything "complicated" so we can all 
> learn.
> > ;)
>
>Well, that's no fun!  ;)

But I wanna learn too... ;)


> > The double hyphen in front of the incoming text is optional and could have
> > spaces on either side of it. The spaces between "fields" is arbitrary (but
> > never tabs). The signal fields always have at least one space on the left,
>
>Is that in addition to the space after the double hyphen?

it is required to make sense. After all, these are comments we are parsing, 
and it is wise to have the signals indented under what they are for...

>Are there any kinds of lines besides comments and signal fields?

Well, the rest of the code, but I have no problem with cut & paste of the 
script out of the VHDL comments and then cutting that block out of the code.

> > The overall length of the script is the most important, speed is
> > no concern. Lines are limited to 78 characters too. :(
>
>Four lines:
>
>#!perl -nl
>s/^ ?-- ?//;push@a,[s/:$//?"--== $_ ==--":/^ *(\S+)\s+(\S+)\s*(\S*)/];
>$;=$:if($:=length$1)>$;}{*b=$_,$#b?($b[2]=~s/.+/_vector($& downto 0)/,
>$b[2]=~s/^/ std_logic/,printf"%-$;s : %s%s;\n",@b):print@b for@a

OK, let's see if I can figure this one out...

I think s/^[ -]*//; would beat s/^ ?-- ?//; wouldn't it? After that, I 
cannot keep track anymore of what is going on. :(

  -adm




__
Aaron D. Marasco
[EMAIL PROTECTED]
http://www.aaronmarasco.com

I love America every day, not just when she needs it.

rm -rf /bin/laden

Reply via email to