/usr/share/doc/racket/scribble/bnf.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4.7 BNF Grammars</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x">Scribble:<span class="mywbr"> </span> The Racket Documentation Tool</a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="getting-started.html" class="tocviewlink" data-pltdoc="x">Getting Started</a></td></tr><tr><td align="right">2 </td><td><a href="reader.html" class="tocviewlink" data-pltdoc="x">@ Syntax</a></td></tr><tr><td align="right">3 </td><td><a href="generic-prose.html" class="tocviewlink" data-pltdoc="x">High-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">4 </td><td><a href="plt-manuals.html" class="tocviewselflink" data-pltdoc="x">Scribbling Documentation</a></td></tr><tr><td align="right">5 </td><td><a href="lp.html" class="tocviewlink" data-pltdoc="x">Literate Programming</a></td></tr><tr><td align="right">6 </td><td><a href="internals.html" class="tocviewlink" data-pltdoc="x">Low-<wbr></wbr>Level Scribble API</a></td></tr><tr><td align="right">7 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running <span class="stt">scribble</span></a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>4 </td><td><a href="plt-manuals.html" class="tocviewlink" data-pltdoc="x">Scribbling Documentation</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1 </td><td><a href="how-to-doc.html" class="tocviewlink" data-pltdoc="x">Getting Started with Documentation</a></td></tr><tr><td align="right">4.2 </td><td><a href="reference-style.html" class="tocviewlink" data-pltdoc="x">Style Guide</a></td></tr><tr><td align="right">4.3 </td><td><a href="manual.html" class="tocviewlink" data-pltdoc="x">Manual Forms</a></td></tr><tr><td align="right">4.4 </td><td><a href="scheme.html" class="tocviewlink" data-pltdoc="x">Racket</a></td></tr><tr><td align="right">4.5 </td><td><a href="eval.html" class="tocviewlink" data-pltdoc="x">Evaluation and Examples</a></td></tr><tr><td align="right">4.6 </td><td><a href="srcdoc.html" class="tocviewlink" data-pltdoc="x">In-<wbr></wbr>Source Documentation</a></td></tr><tr><td align="right">4.7 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">BNF Grammars</a></td></tr><tr><td align="right">4.8 </td><td><a href="Compatibility_Libraries.html" class="tocviewlink" data-pltdoc="x">Compatibility Libraries</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._nonterm%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">nonterm</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-seq%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF-<wbr></wbr>seq</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-seq-lines%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF-<wbr></wbr>seq-<wbr></wbr>lines</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-group%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF-<wbr></wbr>group</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._optional%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">optional</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleenestar%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">kleenestar</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleeneplus%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">kleeneplus</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleenerange%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">kleenerange</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-alt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF-<wbr></wbr>alt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-etc%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">BNF-<wbr></wbr>etc</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="srcdoc.html" title="backward to "4.6 In-Source Documentation"" data-pltdoc="x">← prev</a> <a href="plt-manuals.html" title="up to "4 Scribbling Documentation"" data-pltdoc="x">up</a> <a href="Compatibility_Libraries.html" title="forward to "4.8 Compatibility Libraries"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/scribble/scribble.scrbl")" x-part-tag=""bnf"">4.7<tt> </tt><a name="(part._bnf)"></a><a name="(mod-path._scribble/bnf)"></a>BNF Grammars</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.1" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">scribble/bnf</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">scribble-lib</span></span></td></tr></table></div><div class="SIntrapara">The <span class="RktSym">scribble/bnf</span> library
provides utilities for typesetting grammars.</div></p><p>For example,</p><p><table cellspacing="0" cellpadding="0"><tr><td><p><span class="hspace"> </span><span class="stt">@(let ([open @litchar{(}]</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">[close @litchar{)}])</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@BNF[(list @nonterm{expr}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@nonterm{id}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@BNF-seq[open @kleeneplus[@nonterm{expr}] close]</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@BNF-seq[open @litchar{lambda}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">open @kleenestar[@nonterm{id}] close</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@nonterm{expr} close]</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@nonterm{val})</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">(list @nonterm{val}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@BNF-alt[@nonterm{number} @nonterm{primop}])</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">(list @nonterm{id}</span></p></td></tr><tr><td><p><span class="hspace"> </span><span class="stt"></span><span class="hspace"> </span><span class="stt">@elem{any name except for @litchar{lambda}})])</span></p></td></tr></table></p><p>produces the output</p><p><table cellspacing="0" cellpadding="0"><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">expr</span>›</span></p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span>::=<span class="hspace"> </span></span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">id</span>›</span></p></td></tr><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p> </p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span><span class="hspace"> </span>|<span class="hspace"> </span><span class="hspace"> </span></span></p></td><td valign="baseline"><p><span class="RktInBG"><span class="hspace"></span><span class="RktIn">(</span><span class="hspace"></span></span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span><span style="vertical-align: super; font-size: 80%">+</span><span class="hspace"> </span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">)</span><span class="hspace"></span></span></p></td></tr><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p> </p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span><span class="hspace"> </span>|<span class="hspace"> </span><span class="hspace"> </span></span></p></td><td valign="baseline"><p><span class="RktInBG"><span class="hspace"></span><span class="RktIn">(</span><span class="hspace"></span></span><span class="hspace"> </span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">lambda</span><span class="hspace"></span></span><span class="hspace"> </span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">(</span><span class="hspace"></span></span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">id</span>›</span><span class="sroman">*</span><span class="hspace"> </span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">)</span><span class="hspace"></span></span><span class="hspace"> </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span><span class="hspace"> </span><span class="RktInBG"><span class="hspace"></span><span class="RktIn">)</span><span class="hspace"></span></span></p></td></tr><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p> </p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span><span class="hspace"> </span>|<span class="hspace"> </span><span class="hspace"> </span></span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">val</span>›</span></p></td></tr><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">val</span>›</span></p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span>::=<span class="hspace"> </span></span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">number</span>›</span><span class="stt"><span class="hspace"> </span><span class="hspace"> </span>|<span class="hspace"> </span><span class="hspace"> </span></span><span class="sroman">‹<span style="font-style: italic">primop</span>›</span></p></td></tr><tr><td valign="baseline"><p><span class="hspace"> </span></p></td><td valign="baseline"><p><span class="sroman">‹<span style="font-style: italic">id</span>›</span></p></td><td valign="baseline"><p><span class="stt"><span class="hspace"> </span>::=<span class="hspace"> </span></span></p></td><td valign="baseline"><p>any name except for <span class="RktInBG"><span class="hspace"></span><span class="RktIn">lambda</span><span class="hspace"></span></span></p></td></tr></table></p><p>See also <span class="RktSym"><a href="doc-forms.html#%28form._%28%28lib._scribble%2Fmanual..rkt%29._racketgrammar%29%29" class="RktStxLink" data-pltdoc="x">racketgrammar</a></span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF</a></span></span><span class="hspace"> </span><span class="RktVar">prod</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._table~3f%29%29" class="RktValLink" data-pltdoc="x">table?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">prod</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._cons%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">cons</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._or%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a grammar table. Each production starts with an element
(typically constructed with <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._nonterm%29%29" class="RktValLink" data-pltdoc="x">nonterm</a></span>) for the non-terminal
being defined, and then a list of possibilities (typically constructed
with <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-seq%29%29" class="RktValLink" data-pltdoc="x">BNF-seq</a></span>, etc.) to show on separate lines.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._nonterm))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._nonterm%29%29" class="RktValDef RktValLink" data-pltdoc="x">nonterm</a></span></span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a non-terminal: italic in angle brackets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F-seq))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-seq%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF-seq</a></span></span><span class="hspace"> </span><span class="RktVar">elem</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">elem</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a sequence.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F-seq-lines))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-seq-lines%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF-seq-lines</a></span></span><span class="hspace"> </span><span class="RktVar">elems</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._block~3f%29%29" class="RktValLink" data-pltdoc="x">block?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">elems</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._listof%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">listof</a></span><span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a sequence that is broken into multiple lines, where each
<span class="RktVar">elems</span> is one line.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F-group))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-group%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF-group</a></span></span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a group surrounded by curly braces (so the entire group can
be repeated, for example).</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._optional))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._optional%29%29" class="RktValDef RktValLink" data-pltdoc="x">optional</a></span></span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets an optional element: in square brackets.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._kleenestar))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleenestar%29%29" class="RktValDef RktValLink" data-pltdoc="x">kleenestar</a></span></span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a 0-or-more repetition.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._kleeneplus))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleeneplus%29%29" class="RktValDef RktValLink" data-pltdoc="x">kleeneplus</a></span></span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a 1-or-more repetition.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._kleenerange))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._kleenerange%29%29" class="RktValDef RktValLink" data-pltdoc="x">kleenerange</a></span></span><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">n</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">m</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">pre-content</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=data-structure-contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract%252Fprivate%252Fmisc..rkt%2529._any%252Fc%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets a <span class="RktVar">n</span>-to-<span class="RktVar">m</span> repetition. The <span class="RktVar">n</span> and
<span class="RktVar">m</span> arguments are converted to a string using <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._format%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">format</a></span><span class="stt"> </span><span class="RktVal">"~a"</span><span class="stt"> </span><span class="RktVar">n</span><span class="RktPn">)</span> and <span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._format%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">format</a></span><span class="stt"> </span><span class="RktVal">"~a"</span><span class="stt"> </span><span class="RktVar">m</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F-alt))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-alt%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF-alt</a></span></span><span class="hspace"> </span><span class="RktVar">elem</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">elem</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="core.html#%28def._%28%28lib._scribble%2Fcore..rkt%29._element~3f%29%29" class="RktValLink" data-pltdoc="x">element?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Typesets alternatives for a production’s right-hand side to appear on
a single line. The result is normally used as a single possibility in
a production list for <span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F%29%29" class="RktValLink" data-pltdoc="x">BNF</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._scribble/bnf..rkt)._.B.N.F-etc))"></a><span title="Provided from: scribble/bnf | Package: scribble-lib"><span class="RktSym"><a href="#%28def._%28%28lib._scribble%2Fbnf..rkt%29._.B.N.F-etc%29%29" class="RktValDef RktValLink" data-pltdoc="x">BNF-etc</a></span></span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">string?</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">A string to use for omitted productions or content.</div></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="srcdoc.html" title="backward to "4.6 In-Source Documentation"" data-pltdoc="x">← prev</a> <a href="plt-manuals.html" title="up to "4 Scribbling Documentation"" data-pltdoc="x">up</a> <a href="Compatibility_Libraries.html" title="forward to "4.8 Compatibility Libraries"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|