Hacker News new | past | comments | ask | show | jobs | submit login

The mawk version of the language will output C, if I remember correctly. It is the fastest AWK, and supports some of the GNU extensions.

"The One True AWK" from Brian Kernighan (that is still the system AWK in OpenBSD) switched from a yacc implementation to a custom parser sometime within the last decade (fairly recently).

Busybox also has an awk; I'm not sure what they do.

GNU awk is elsewhere reported to be interpreted bytecode.




Dennis Ritchie about yacc history details

> In some ways the interesting thing is that the parser (probably for B, couldn't have been C based on radiocarbon dating evidence) was tiny and dead simple using recursive descent for most parts, a precedence table for expressions. But out of the intellectual culture-meets-culture encounter, an enduring tool was created.

https://yarchive.net/comp/handwritten_parse_tables.html


Looks like OpenBSD awk still uses yacc, like other copies of bwk‘s one true awk https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/awk/#d...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: