17 Creating Languages

The macro facilities defined in the preceding chapter let a programmer define syntactic extensions to a language, but a macro is limited in two ways:

+The distinction between the reader and expander layer is introduced in Lists and Racket Syntax.

That is, a macro can only extend a language, and it can do so only at the expander layer. Racket offers additional facilities for defining a starting point of the expander layer, for extending the reader layer, for defining the starting point of the reader layer, and for packaging a reader and expander starting point into a conveniently named language.

    17.1 Module Languages

      17.1.1 Implicit Form Bindings

      17.1.2 Using #lang s-exp

    17.2 Reader Extensions

      17.2.1 Source Locations

      17.2.2 Readtables

    17.3 Defining new #lang Languages

      17.3.1 Designating a #lang Language

      17.3.2 Using #lang reader

      17.3.3 Using #lang s-exp syntax/module-reader

      17.3.4 Installing a Language

      17.3.5 Source-Handling Configuration

      17.3.6 Module-Handling Configuration