In MzScheme, syntactic forms (such as lambda or define) are handled by a binding global variable to a Scheme value representing a syntax resolver. MzScheme does not allow a variable that is bound to a syntax resolver to be used in a non-application position.
MzScheme can be extended with arbitrary syntactic forms. However, this is difficult, and it is rarely necessary. Most any functionality can be added to MzScheme by adding new primitive procedures (and perhaps some macros) instead.
A new syntax resolver is created by passing two function pointers to scheme_make_compiled_syntax:
Thus, extending MzScheme with new run-time syntax typically requires three functions: a compiler, an executor, and an expander. To support saving compiled code to a file, two additional functions may be necessary: a writer and reader for the compiler/executor syntax data.