September 2023
Intermediate to advanced
240 pages
7h 40m
English
Awk is often used to develop translators for “little languages,” that is, languages for specialized applications. One reason for writing a translator is to learn how a language processor works. The first example in this chapter is an assembler that in twenty lines or so shows the essentials of the assembly process. It is accompanied by an interpreter that executes the assembled programs. The combination illustrates the rudiments of assembly language and computer architecture. Other examples show the basic operation of several calculators and of a recursive-descent translator for a subset of Awk itself.
You might want to experiment with the syntax or semantics of a special-purpose language before making a large investment in ...