Article View: alt.lang.awk
Article #25Re: awk compilers
From: Christopher J. Hawley
Date: Tue, 26 Jan 1993 20:31
Date: Tue, 26 Jan 1993 20:31
63 lines
3179 bytes
3179 bytes
In article <1993Jan22.210456.25409@psych.toronto.edu>,
gswan@psych.toronto.edu (George Swan) writes:
+ From: gswan@psych.toronto.edu (George Swan)
+ Subject: awk compilers for MS-DOS (was Re: About AWKCC)
+ Message-ID: <1993Jan22.210456.25409@psych.toronto.edu>
+ Summary: Such things exist
+ Organization: Department of Psychology, University of Toronto
+ Date: Fri, 22 Jan 93 13:04:56 PDT
[11 lines omitted]
+ Thompson Automation, of uh, I forget, has been selling
+ an awk compiler for MS-DOS for at least a year now.
+ I have basically been happy with it. One strange feature
+ is that all of the binaries it has created for me have all
+ been the same size.
Hmm, this sounds kinda familiar... an obscure feature of awk , frequently
disabled during compilation (making it unavailable), was the ability to write
a core image of awk after it had parsed the supplied script (program). If
this feature is enabled, the command
awk -S -f script.awk
would produce a file named awk.out -- a core image. This image could be
subsequently "resumed" with the command
awk -Rawk.out [filename]
under the right conditions -- one being the requirement that the text segment
be writeable -- with (potential!) saving of time which would otherwise be
needed to parse the script file.
It's a long shot, but my guess is that the T.A. compiler does something
similar: it creates a post-parsing core image of some awk (either embedded,
or on your system (does the compiler require you to have awk installed?)),
and wraps the image in a skeleton to produce an executable file.
[ Just for grins, try disassembling a program which the compiler produces to
see if there's an obvious connection. e.g.: embedded awk usage message.
]
If you're curious, there's a short paper called
A Supplemental Document For AWK
-or-
Things Al, Pete, And Brian Didn't Mention Much
written some time ago by John W. Pierce, which describes several features,
known bugs, etc.; it also contains practical suggestions, plus interesting
or obscure (albeit dated) tidbits about awk . I'm not exactly certain of
the archive location from which I FTP'd the paper, but I think it's archived
on cs.toronto.edu: with the filename "awk.supp", somewhere under doc/
directory.
Don't hold me to that, though; check with archie first if possible.
#include <std/disclaimer.h>
/* Employed by SGI in a non-speaking capacity. All opinions are mine. */
--
- Christopher J. Hawley / esper
Technical Details
Message-ID:
<vccorbc@zola.esd.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!sgigate!odin!twilight!zola!sundiver.esd.sgi.com!chawleyReferences:
<1993Jan22.115028.17060@cas.org> <1993Jan22.210456.25409@psych.toronto.edu>Show Full Headers
Complete Article Headers
Newsgroups: alt.lang.awk Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!sgigate!odin!twilight!zola!sundiver.esd.sgi.com!chawley From: chawley@sundiver.esd.sgi.com (Christopher J. Hawley) Subject: Re: awk compilers Message-ID: <vccorbc@zola.esd.sgi.com> Sender: news@zola.esd.sgi.com (Net News) Reply-To: chawley@sundiver.esd.sgi.com Organization: Silicon Graphics, Inc. / DSSD References: <1993Jan22.115028.17060@cas.org> <1993Jan22.210456.25409@psych.toronto.edu> Distribution: na Date: Tue, 26 Jan 93 20:31:50 GMT Lines: 65