jannick0 / awka

Revive awka - Awk to C Compiler

Home Page:http://awka.sourceforge.net/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Awka

Awka is highlighted as "Open Source, AWK to C Conversion Tool" on its web site http://awka.sourceforge.net/index.html

  • Awka has two main parts: a translator and a library.
  • awka translate a Awk script into C code
  • libawka is used as link library to compile the generated C code.

Why compile Awk script into C program?

  • C program probably run faster.
  • "AWK programs are limited to what the interpreter provides".
  • "C code can be compiled with other code into a larger application."
  • "migrate stable functions from AWK to C" to impove performance.
  • Reuse existing C functions in Awk script.
  • A way of protect your Awk script.

Actually, the mixing use of Awk and C provide provide an interesting way of writing programs.

Revive Awka

Awka is an "old" project. Its last change 0.7.5 was on June 20 2001.

And to fill my usage requirement, some of my update to the code go much furhter than traditional "Awk".

What's new in "Revive Awka"?

  • Fix bugs in awka-0.7.5
  • Add libawka builtin function fseek and ftell to increase performance.
  • Add glob style matching, which shold be faster than regular expression in many case.
  • Lazy calling of line split function to increase performance.
  • Use nstring other than NULL terminated C string to avoid string copy.

What to do next?

  • Continue bug fixing.
  • Continue libawka performance improvement.
  • Support flexibl synax in the "Awk" script.
    • For example, add direct Tcl language support.
  • Make it thread safe to support processing multiple files in parallel.

About

Revive awka - Awk to C Compiler

http://awka.sourceforge.net/index.html


Languages

Language:C 79.5%Language:Awk 8.1%Language:Yacc 3.1%Language:Makefile 2.8%Language:C++ 1.9%Language:Objective-C 1.6%Language:Tcl 1.1%Language:M4 0.9%Language:Perl 0.8%Language:Shell 0.1%Language:Perl 6 0.1%