Awk-Like JavaScript

I’ve been thinking about the Awk in JavaScript implementation that I want to do. Ultimately what I wanted was essentially a version of JavaScript that could support Awk style programs / patterns.

I think it will actually be easier just to do that, than to try a full implementation of Awk in JavaScript. All I have to do to get the Awk-like version of JavaScript to work, is figure out how to transform the pattern / action pairs that Awk supports into the equivalent if / body statements in Javascript. The the only other things that really need to be done is creating the implicit read loop and the autospliting of lines into the $0 – $n variables. I guess there might be other variables that should be auto-generated also.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s