[comp.unix.shell] awk to C

james@dlss2.UUCP (James Cummings) (10/03/90)

	There is an awk to C translator?....what's it called?

shun@cbnewsh.att.com (shun.cheung) (10/04/90)

In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
> 	There is an awk to C translator?....what's it called?

There is a translator called "awkcc" implemented at AT&T Bell Labs.
It speeds up the program drastically.

-- 
-- Shun Cheung, AT&T Bell Laboratories, Middletown, New Jersey
     electronic: shun@hou2d.att.com,  att!hou2d!shun,  or shun@cbnewsh.att.com
       voice: (908) 615-5135

mvadh@cbnews.att.com (andrew.d.hay) (10/04/90)

In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
> 
> 	There is an awk to C translator?....what's it called?

awkcc

-- 
Andrew Hay		+------------------------------------------------------+
Ragged Individualist	| 	You just have _N_O idea!  It's the difference    |
AT&T-BL Ward Hill MA	|	between _S_H_O_O_T_I_N_G a bullet and _T_H_R_O_W_I_N_G it!     |
a.d.hay@att.com		+------------------------------------------------------+

lvc@cbnews.att.com (Lawrence V. Cipriani) (10/04/90)

In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
> 
> 	There is an awk to C translator?....what's it called?

Yes.  There is one in the AT&T Toolchest called awkcc.  See my previous
post for Toolchest phone number and login.

Jon Bentley did some research on awkcc produced C programs and found the
C programs it generated were generally faster by an order of magnitude
than the awk input programs; however, there were a few instances where
the awk programs were faster.  Usually if there was a lot of i/o the C
program was faster.
-- 
Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com
           "Save a logger, eat an owl"

cjc@ulysses.att.com (Chris Calabrese) (10/05/90)

In article <1990Oct4.113742.23650@cbnews.att.com> mvadh@cbnews.att.com (andrew.d.hay) writes:
>In article <92@dlss2.UUCP>, james@dlss2.UUCP (James Cummings) writes:
>> 
>> 	There is an awk to C translator?....what's it called?
>
>awkcc

Hmm, seems like someone should expand on this a little.

awkcc is a New Awk to C translator done in my center by
J. Christopher Ramming.  It is available from the AT&T Toolchest
(no, I don't know the price).

It should be fairly portable on UNIX boxes.  Don't know about other
OS'.  I know it's been used on BSD 4.3 [VAX and CCI Tahoe],
System V [3B2 and '386], SunOS [Sun 3 and Sun 4], and MIPS.
Name:			Christopher J. Calabrese
Brain loaned to:	AT&T Bell Laboratories, Murray Hill, NJ
att!ulysses!cjc		cjc@ulysses.att.com
Obligatory Quote:	``pher - gr. vb. to schlep.  phospher - to schlep light.philosopher - to schlep thoughts.''

lvc@cbnews.att.com (Lawrence V. Cipriani) (10/05/90)

In article <1990Oct4.131446.28302@cbnews.att.com>, lvc@cbnews.att.com (Lawrence V. Cipriani) writes:
> Yes.  There is one in the AT&T Toolchest called awkcc.  See my previous
> post for Toolchest phone number and login.

I feel obliged to post this email I received regarding awkcc from someone
who knows much more about it than I.

>     Awkcc generally is very useful but there problems to be encountered,
>     e.g. memory not freed NOR reused for closed pipes streams.
>     Ended up switching back to C after a brief look inside awkcc;

The author of awkcc Chris Ramming left AT&T for academia; I have no idea
if anyone is actively maintaining awkcc.
-- 
Larry Cipriani, att!cbvox!lvc or lvc@cbvox.att.com
           "Save a logger, eat an owl"

cjc@ulysses.att.com (Chris Calabrese) (10/06/90)

In article <1990Oct5.121442.13720@cbnews.att.com> lvc@cbnews.att.com (Lawrence V. Cipriani) writes:
>
>The author of awkcc Chris Ramming left AT&T for academia; I have no idea
>if anyone is actively maintaining awkcc.

Chris was away for a year, but he's been back since June (I think
that's when he got back).  Anyway, yes he's alive and well and living
(at least working) in Murray Hill.

It is true that there are problems with memory usage and pipes, but
Chris is (supposed to be) working on it.  In any event, he's still
maintaining it.

Name:			Christopher J. Calabrese
Brain loaned to:	AT&T Bell Laboratories, Murray Hill, NJ
att!ulysses!cjc		cjc@ulysses.att.com
Obligatory Quote:	``pher - gr. vb. to schlep.  phospher - to schlep light.philosopher - to schlep thoughts.''