TAWK Compiler

by Thompson Automation Software

What's New in TAWK 5.0

What is all this about TAWK?

We believe the TAWK programming language is one of the major programming breakthroughs of this decade. It fills the niche providing the ease of use of simpler languages but the power and flexibility of more complicated languages. Try it and see if you don't agree this is the easiest way to program ever.

What is TAWK?

The Thompson AWK language, or TAWK for short, is a vastly improved compiled version of the normally interpreted awk language. Unlike awk, TAWK is a robust general purpose programming language that can handle any programming task. For those unfamiliar with awk, the TAWK language resembles the "C" programming language, but is much easier to use and has extensive built-in error checking that eliminates program crashes. Unlike "C", TAWK includes powerful built-in functions for searching, sorting and manipulating text and data-base records making it especially valuable for these types of applications.

TAWK is backward compatible with the original awk language and retains the ease of use that made the awk language popular. The name "awk" was derived from the original author's names: Alfred Aho, Peter Weinberger and Brian Kernighan.

Why is TAWK so Easy to Use?

New TAWK Debugger

TAWK's new Full Screen Interactive TAWK Debugger provides you with visual execution of your program. Includes all debugger features: Trace into or over functions; Animate execution; Breakpoints; View, change or watch variables, and much more. What's more, the debugger itself is written in TAWK and the source code is included!

TAWK Language Features

TAWK Compiler Features

Typical AWK Applications

These are just a few real applications reported by our customers. Some of these are huge commercial programs designed with the TAWK Compiler:

Why is TAWK Better?

The original awk language was easy to use and great for small text processing programs but was not designed for commercial applications. (It allowed only one source file, no variable declarations, no debugger, no compiler, etc.) TAWK is an industrial-strength commercial-grade program development system and includes extensive functionality that is missing in awk.

Comparison of TAWK with the C Programming Language

Here is a comparison of the TAWK language to the "C" language. These example programs were written using both a "C" compiler and the TAWK Compiler, then the development and execution times of the two languages were compared. These are real programs. We didn't make this up.
Program 1:
Description:    Search files for pattern.
TAWK Compiler:  Development Time:  1 minute;    Execution Time: 4.9 sec;
C Compiler:     Development Time: 15 minutes;   Execution Time: 4.4 sec;

Program 2:
Description:    Convert text file to postscript.
TAWK Compiler:  Development Time: 15 minutes;   Execution Time: 15.2 sec;
C Compiler:     Development Time: 90 minutes;   Execution Time: 17.9 sec;

Program 3:
Description:    Typesetter program.
TAWK Compiler:  Development Time: 8 hours;      Execution Time: 6.3 sec;
C Compiler:     Development Time: 4 days;       Execution Time: 2.3 sec;

Notes:  C programs were compiled using Microsoft C, large model,
with maximum optimization  (/Ox  option).
Other tested C Compilers gave similar times.
These results are startling. You would naturally expect the program development time to be much faster using TAWK than C. But Program 2 actually runs faster using TAWK than using C! (This is not usually the case.) The reason for this program's speed is that the core functionality is implemented as a series of gsub (global substitution) function calls in TAWK, and as a small "switch" statement in C. The regular expression matching engine used by TAWK is so fast that several gsub function calls are actually faster than a case statement to implement the same functionality in C.

Program 3 ran slower in TAWK than in C, but this is not the whole story. The output of the typesetter program needs to be accurate to 1/12000 of an inch. The C version of the program goes to a great deal of effort to offset all font and page measurements so that the resulting values fit into an integer. The TAWK version of the program simply used floating point to implement the same functionality, which was extremely easy to do. The difference in times is primarily due to the difference between floating point and integer operations.

You should not really expect your TAWK programs to run faster that equivalent C versions in all cases. However, for text processing applications, the functions that we have provided inside TAWK are highly optimized, and will often out-perform hand-written code in C.

Its hard to lose developing with the TAWK Compiler: even when you plan to write the final program in C you benefit from having a working prototype in a fraction of the time!

System Requirements:

Version for Microsoft Windows
Requires any modern version of Microsoft Windows (Windows XP, Windows ME, Windows 2000, Windows NT, Windows 98 or Windows 95. The ancient Windows version 3 or older is not supported.) All programs are full 32-bit executables and support long filenames on both FAT and NTFS disk partitions.
Version for DOS
Requires DOS version 3.3 or higher, or Microsoft Windows version 3.1, or Windows for Work-groups. Extended or expanded memory is used automatically. A minimum of 512K memory is required. A floating point unit is not required but will be utilized if available.

Return to Thompson Automation Software Home Page