Honu: Syntactic Extension for Algebraic Notation through Enforestation

Jon Rafkind and Matthew Flatt

Honu is a new language that fuses traditional algebraic notation (e.g., infix binary operators) with Scheme-style language extensibility. A key element of Honu's design is an enforestation parsing step, which converts a flat stream of tokens into an S-expression-like tree, in addition to the initial "read" phase of parsing and interleaved with the "macro-expand" phase. We present the design of Honu, explain its parsing and macro-extension algorithm, and show example syntactic extensions.