commit baeb07fef4d9ea306348fb44fb425cc103b8d077 parent 195d31a85483feb29a089f513fe288af2fde4962 Author: Wolfgang Corcoran-Mathe <wcm@sigwinch.xyz> Date: Mon, 5 Feb 2024 19:00:22 -0500 Formal syntax: Restore library grammar, which was missing. Diffstat:
M | doc/r7rs-small/formal-syntax.texinfo | | | 31 | +++++++++++++++++++++++++++++++ |
1 file changed, 31 insertions(+), 0 deletions(-)
diff --git a/doc/r7rs-small/formal-syntax.texinfo b/doc/r7rs-small/formal-syntax.texinfo @@ -354,3 +354,34 @@ a list pattern, not a vector pattern or an identifier pattern. @node Libraries formal @subsection Libraries (formal) + +@display +@svar{library} @expansion{} + (d\=efine-library @svar{library name} + \arbno{@svar{library declaration}}) +@svar{library name} \: (\atleastone{@svar{library name part}}) +@svar{library name part} \: @svar{identifier} | @svar{uinteger 10} +@svar{library declaration} \: (export \arbno{@svar{export spec}}) + | @svar{import declaration} + | (begin \arbno{@svar{command or definition}}) + | @svar{includer} + | (include-library-declarations \atleastone{@svar{string}}) + | (cond-expand \atleastone{@svar{cond-expand clause}}) + | (cond-expand \atleastone{@svar{cond-expand clause}} + (else \arbno{@svar{library declaration}})) +@svar{import declaration} \: (import \atleastone{@svar{import set}}) +@svar{export spec} \: @svar{identifier} + | (rename @svar{identifier} @svar{identifier}) +@svar{import set} \: @svar{library name} + | (only @svar{import set} \atleastone{@svar{identifier}}) + | (except @svar{import set} \atleastone{@svar{identifier}}) + | (prefix @svar{import set} @svar{identifier}) + | (rename @svar{import set} \atleastone{(@svar{identifier} @svar{identifier})}) +@svar{cond-expand clause} \: + (@svar{feature requirement} \arbno{@svar{library declaration}}) +@svar{feature requirement} \: @svar{identifier} + | @svar{library name} + | (and \arbno{@svar{feature requirement}}) + | (or \arbno{@svar{feature requirement}}) + | (not @svar{feature requirement}) +@end display