[comp.unix.questions] Awk-compiler

aerts@neabbs.UUCP (AD AERTS) (03/22/90)

Has anyone ever seen an AWK-compiler? AWK-to-C would be fine too.

+-------------------------+------------------------------------------------+
| Ad Aerts                | It's a shame each of my messages sees more of  |
| AERTS@HUTRUU52.BITNET   | the world than I ever will...                  |
| aerts@media00.uucp      |                                                |
+-------------------------+------------------------------------------------+

jharkins@sagpd1.UUCP (Jim Harkins) (03/27/90)

In article <338774@neabbs.UUCP> aerts@neabbs.UUCP (AD AERTS) writes:
>
>Has anyone ever seen an AWK-compiler? AWK-to-C would be fine too.

Mail bounced so...

Look into the document "A supplemental document for awk" subtitled "things
Al, Pete, and Brian didn't mention much".  I snarfed it off the net a few
years ago and it's probably archived somewhere.  Anyway, it says

-- begin direct quoting -- 

2.5 Script "Compilation"
[It is likely that this does not work at most sites.  If it does not, the
following will probably not be of interest to the casual user.]

The command

	awk -S -f script.awk

produces a file named awk.out.  This is a core image of awk after parsing
the file script.awk.  The command 

	awk -Rawk.out datafile

causes awk.out to be applied to datafile (or the standard input if no file
is given).  Unfortunately, the way this is implemented requires some special
action on the part of the person installing awk.

-- end quoting --

It's a good document, and I suspect I'm going to get bazillions of requests to
post it :-)


-- 
jim		jharkins@sagpd1

We are all aware of the high cost of alcohol abuse.  To help solve this problem
take this signature to your local liquor store for $1.00 off your next purchase.