Next: scheme basic safety, Previous: scheme basic argument checking, Up: scheme basic [Index]
The subforms of a special form usually need to obey certain syntactic restrictions. As forms may be subject to macro expansion, which may not terminate, the question of whether they obey the specified restrictions is undecidable in general.
When macro expansion terminates, however, implementations must detect violations of the syntax. A syntax violation is an error with respect to the syntax of library bodies, top–level bodies, or the “syntax” entries in the specification of the base library or the standard libraries. Moreover, attempting to assign to an immutable variable (i.e. the variables exported by a library) is also considered a syntax violation.
If a top–level or library form in a program is not syntactically
correct, then the implementation must raise an exception with condition
type &syntax
, and execution of that top–level program or library
must not be allowed to begin.