Re: Looking for awk compiler - Awk2C ?

Whitten@Fwva.Saic.Com (David Whitten)
Thu, 18 Mar 1993 23:06:14 GMT

          From comp.compilers

Related articles
Looking for awk compiler (Andrew Shao-Chun Huang) (1993-03-16)
Re: Looking for awk compiler - Awk2C ? Whitten@Fwva.Saic.Com (1993-03-18)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Whitten@Fwva.Saic.Com (David Whitten)
Keywords: interpreter
Organization: Science Applications Int'l, Corp. - Computer systems operation
References: 93-03-058
Date: Thu, 18 Mar 1993 23:06:14 GMT

Andrew Shao-Chun Huang <> writes:
>Does anyone know of a compiler for the awk language?

Perhaps someone else knows, but I believe there is a program called awk2c
which 'compiles' awk code into C code.

On a general compilers question, is this kind of program a good idea? If
you have a program written in one language, is it reasonable to implement
the language by writing a 'compiler' that converts it into C ?

It seems to me that if the original language made a lot of assumptions the
same way that C does, (null terminated strings, i/o as a function call,
large flat address space, no function definitions within other functions,
etc. ) that this would be a Good Thing.

But a language that doesn't make some of these same decisions the same way
would have a lot of overhead.

I know there has to be some experience out on the 'net, since there are to
my knowledge (only by reading the net, I don't know the ftp sites):
Awk to C
Basic to C
C++ to C
C To C (K&R -> ANSI , ANSI -> K&R)
Eiffel to C
Fortran to C
Lisp to C
Modula to C
Pascal to C
Scheme to C

Some of these originating languages make a LOT of decisions differently
than C does. It seems that the generated C code can't be very good unless
there is some kind of Code analysis in the individual language to make the
best match to C data structures.

Anyone know more than I do?
David ( US:(619)535-7764

Post a followup to this message

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