3 ms·
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" fro
by chasil 7y ago
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.
- snaky 7y agoDennis 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 https://yarchive.net/comp/handwritten_parse_tables.html
- fanf2 7y agoLooks 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/#dirlist https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/awk/#d...