SUMMARY: Looking for awk compiler

Andrew Shao-Chun Huang <ahuang@bach.ece.cmu.edu>
Thu, 25 Mar 1993 05:16:48 GMT

          From comp.compilers

Related articles
Looking for awk compiler ahuang@bach.ece.cmu.edu (Andrew Shao-Chun Huang) (1993-03-16)
SUMMARY: Looking for awk compiler ahuang@bach.ece.cmu.edu (Andrew Shao-Chun Huang) (1993-03-25)
Re: Looking for awk compiler megatest!plethorax!djones@uu4.psi.com (1993-03-26)
Re: SUMMARY: Looking for awk compiler seanw@mks.com (1993-03-26)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Andrew Shao-Chun Huang <ahuang@bach.ece.cmu.edu>
Keywords: interpreter, summary
Organization: Compilers Central
References: 93-03-058
Date: Thu, 25 Mar 1993 05:16:48 GMT

A while ago I asked:


> Does anyone know of a compiler for the awk language? ...




I've since received numerous responses. Instead of listing all of them,
I'll just summarize:


    o The AT&T Toolchest includes an awk to C translator called awkcc.
        When an awk script is translated to C and then compiled with cc,
        speedup of 2-6 can be obtained. Price for the source code of the
        Toolchest is $175.


    o Mawk, by Mike Brennon, is an implementation of the 'new awk' language
        that is 2-5 times as fast as standard awk. Even though it is an
        interpreter, mawk first converts a program into an intermediate form
        before interpreting it. It can be ftp'd from oxy.edu:public/mawk.


    o MKS toolkit comes with an AWK to C translator.


    o Perl (Practical Extraction and Report Language) comes with an awk to
        perl translator. The perl package can be ftp'd from prep.ai.mit.edu
        in pub/gnu.


    o One person also suggested rewriting the script in Icon language.
        This language is supposedly good for text processing, AI, symbolic
        math, prototyping, etc. Icon can be ftp'd from cs.arizona.edu.


My goal was to speedup my awk script without having to learn another
language. So icon was out. The awk to perl translator was not entirely
successful at translating my script. I would have had to learn perl to
figure out what went wrong. So in the end, I went with mawk. My script
ran 2.5 times as fast with mawk as it did with gawk.


Thanks to the following people for their responses:
        Tim Channon, Ian Searle, David Whitten, Joshua Levy, Kurt Bischoff,
        Rayaz Jagani, Demitry Kohmanyuk, Mark Streich, Mauricio Breternitz Jr,
        Jeremy Fitzhardinge, Amnon Cohen, Norman Ramsey, Jeff Fried, Scott
        Robinson.


-Andrew


----------------------------------------------------------------
Andrew Huang ahuang@ece.cmu.edu
Electrical & Computer Engineering (412) 268-7101
Carnegie Mellon University
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.