/usr/share/doc/racket/syntax/stxparse-patterns.html is in racket-doc 6.7-3.
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 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | <!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>1.5 Syntax Patterns</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="../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="../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">Syntax:<span class="mywbr"> </span> Meta-<wbr></wbr>Programming Helpers</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="stxparse.html" class="tocviewselflink" data-pltdoc="x">Parsing and Specifying Syntax</a></td></tr><tr><td align="right">2 </td><td><a href="syntax-helpers.html" class="tocviewlink" data-pltdoc="x">Syntax Object Helpers</a></td></tr><tr><td align="right">3 </td><td><a href="Datum_Pattern_Matching.html" class="tocviewlink" data-pltdoc="x">Datum Pattern Matching</a></td></tr><tr><td align="right">4 </td><td><a href="module-helpers.html" class="tocviewlink" data-pltdoc="x">Module-<wbr></wbr>Processing Helpers</a></td></tr><tr><td align="right">5 </td><td><a href="transformer-helpers.html" class="tocviewlink" data-pltdoc="x">Macro Transformer Helpers</a></td></tr><tr><td align="right">6 </td><td><a href="reader-helpers.html" class="tocviewlink" data-pltdoc="x">Reader Helpers</a></td></tr><tr><td align="right">7 </td><td><a href="Parsing_for_Bodies.html" class="tocviewlink" data-pltdoc="x">Parsing <span class="RktSym"><span class="RktStxLink">for</span></span> Bodies</a></td></tr><tr><td align="right">8 </td><td><a href="Unsafe_for_Clause_Transforms.html" class="tocviewlink" data-pltdoc="x">Unsafe <span class="RktSym"><span class="RktStxLink">for</span></span> Clause Transforms</a></td></tr><tr><td align="right">9 </td><td><a href="Source_Locations.html" class="tocviewlink" data-pltdoc="x">Source Locations</a></td></tr><tr><td align="right">10 </td><td><a href="Preserving_Source_Locations.html" class="tocviewlink" data-pltdoc="x">Preserving Source Locations</a></td></tr><tr><td align="right">11 </td><td><a href="toplevel.html" class="tocviewlink" data-pltdoc="x">Non-<wbr></wbr>Module Compilation And Expansion</a></td></tr><tr><td align="right">12 </td><td><a href="trusted-xforms.html" class="tocviewlink" data-pltdoc="x">Trusting Standard Recertifying Transformers</a></td></tr><tr><td align="right">13 </td><td><a href="docprovide.html" class="tocviewlink" data-pltdoc="x">Attaching Documentation to Exports</a></td></tr><tr><td align="right">14 </td><td><a href="wrapc.html" class="tocviewlink" data-pltdoc="x">Contracts for Macro Subexpressions</a></td></tr><tr><td align="right">15 </td><td><a href="macro-testing.html" class="tocviewlink" data-pltdoc="x">Macro Testing</a></td></tr><tr><td align="right">16 </td><td><a href="intdef.html" class="tocviewlink" data-pltdoc="x">Internal-<wbr></wbr>Definition Context Helpers</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>1 </td><td><a href="stxparse.html" class="tocviewlink" data-pltdoc="x">Parsing and Specifying Syntax</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.1 </td><td><a href="stxparse-intro.html" class="tocviewlink" data-pltdoc="x">Introduction</a></td></tr><tr><td align="right">1.2 </td><td><a href="stxparse-examples.html" class="tocviewlink" data-pltdoc="x">Examples</a></td></tr><tr><td align="right">1.3 </td><td><a href="Parsing_Syntax.html" class="tocviewlink" data-pltdoc="x">Parsing Syntax</a></td></tr><tr><td align="right">1.4 </td><td><a href="stxparse-specifying.html" class="tocviewlink" data-pltdoc="x">Specifying Syntax with Syntax Classes</a></td></tr><tr><td align="right">1.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Syntax Patterns</a></td></tr><tr><td align="right">1.6 </td><td><a href="Defining_Simple_Macros.html" class="tocviewlink" data-pltdoc="x">Defining Simple Macros</a></td></tr><tr><td align="right">1.7 </td><td><a href="Literal_Sets_and_Conventions.html" class="tocviewlink" data-pltdoc="x">Literal Sets and Conventions</a></td></tr><tr><td align="right">1.8 </td><td><a href="Library_Syntax_Classes_and_Literal_Sets.html" class="tocviewlink" data-pltdoc="x">Library Syntax Classes and Literal Sets</a></td></tr><tr><td align="right">1.9 </td><td><a href="Debugging_and_Inspection_Tools.html" class="tocviewlink" data-pltdoc="x">Debugging and Inspection Tools</a></td></tr><tr><td align="right">1.10 </td><td><a href="Experimental.html" class="tocviewlink" data-pltdoc="x">Experimental</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_2");">►</a></td><td>1.5 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Syntax Patterns</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">1.5.1 </td><td><a href="#%28part._.Single-term_.Patterns%29" class="tocviewlink" data-pltdoc="x">Single-<wbr></wbr>term Patterns</a></td></tr><tr><td align="right">1.5.2 </td><td><a href="#%28part._.Head_.Patterns%29" class="tocviewlink" data-pltdoc="x">Head Patterns</a></td></tr><tr><td align="right">1.5.3 </td><td><a href="#%28part._.Ellipsis-head_.Patterns%29" class="tocviewlink" data-pltdoc="x">Ellipsis-<wbr></wbr>head Patterns</a></td></tr><tr><td align="right">1.5.4 </td><td><a href="#%28part._.Action_.Patterns%29" class="tocviewlink" data-pltdoc="x">Action Patterns</a></td></tr><tr><td align="right">1.5.5 </td><td><a href="#%28part._.Pattern_.Expanders%29" class="tocviewlink" data-pltdoc="x">Pattern Expanders</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="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~var</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~and</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~or</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~describe</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~commit</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~delimit-<wbr></wbr>cut</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epost%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~post</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">~optional</span></span></a></td></tr><tr><td><span class="tocsublinknumber">1.5.1<tt> </tt></span><a href="#%28part._.Single-term_.Patterns%29" class="tocsubseclink" data-pltdoc="x">Single-<wbr></wbr>term Patterns</a></td></tr><tr><td><span class="tocsublinknumber">1.5.2<tt> </tt></span><a href="#%28part._.Head_.Patterns%29" class="tocsubseclink" data-pltdoc="x">Head Patterns</a></td></tr><tr><td><span class="tocsublinknumber">1.5.3<tt> </tt></span><a href="#%28part._.Ellipsis-head_.Patterns%29" class="tocsubseclink" data-pltdoc="x">Ellipsis-<wbr></wbr>head Patterns</a></td></tr><tr><td><span class="tocsublinknumber">1.5.4<tt> </tt></span><a href="#%28part._.Action_.Patterns%29" class="tocsubseclink" data-pltdoc="x">Action Patterns</a></td></tr><tr><td><span class="tocsublinknumber">1.5.5<tt> </tt></span><a href="#%28part._.Pattern_.Expanders%29" class="tocsubseclink" data-pltdoc="x">Pattern Expanders</a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pattern-<wbr></wbr>expander</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._prop~3apattern-expander%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">prop:<span class="mywbr"> </span>pattern-<wbr></wbr>expander</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">pattern-<wbr></wbr>expander?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._syntax-local-syntax-parse-pattern-introduce%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">syntax-<wbr></wbr>local-<wbr></wbr>syntax-<wbr></wbr>parse-<wbr></wbr>pattern-<wbr></wbr>introduce</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.7", "../");" 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.7");">top</a></span><span class="navright"> <a href="stxparse-specifying.html" title="backward to "1.4 Specifying Syntax with Syntax Classes"" data-pltdoc="x">← prev</a> <a href="stxparse.html" title="up to "1 Parsing and Specifying Syntax"" data-pltdoc="x">up</a> <a href="Defining_Simple_Macros.html" title="forward to "1.6 Defining Simple Macros"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""stxparse-patterns"">1.5<tt> </tt><a name="(part._stxparse-patterns)"></a>Syntax Patterns</h4><p><div class="SIntrapara">The grammar of <a name="(tech._syntax._pattern)"></a><span style="font-style: italic">syntax patterns</span> used by
<a href="stxparse.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">syntax/parse</span></a> facilities is given in the following
table. There are four main kinds of syntax pattern:
</div><div class="SIntrapara"><ul><li><p><a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term patterns</span></a>, abbreviated <span class="RktVar">S-pattern</span></p></li><li><p><a href="#%28tech._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">head patterns</span></a>, abbreviated <span class="RktVar">H-pattern</span></p></li><li><p><a href="#%28tech._ellipsis._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">ellipsis-head patterns</span></a>, abbreviated <span class="RktVar">EH-pattern</span></p></li><li><p><a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action patterns</span></a>, abbreviated <span class="RktVar">A-pattern</span></p></li></ul></div><div class="SIntrapara">A fifth kind, <a href="#%28tech._list._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">list patterns</span></a> (abbreviated
<span class="RktVar">L-pattern</span>), is a just a syntactically restricted subset of
<a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term patterns</span></a>.</div></p><p>When a special form in this manual refers to <span class="RktVar">syntax-pattern</span>
(eg, the description of the <span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span> special form), it
means specifically <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a>.</p><p><table cellspacing="0" cellpadding="0"><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">S-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">pvar-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">pvar-id:syntax-class-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">pvar-id:literal-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">literal-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7evar._s-%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s-</span></a><span class="hspace"> </span><span class="RktVar">id</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7evar._s%2B%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s+</span></a><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktVar">syntax-class-id</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7evar._s%2B%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s+</span></a><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">syntax-class-id</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span><span class="hspace"> </span><span class="RktVar">literal-id</span><span class="hspace"> </span><span class="RktVar">maybe-phase</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">atomic-datum</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxLink" data-pltdoc="x">~datum</a></span><span class="hspace"> </span><span class="RktVar">datum</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">A-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">EH-pattern</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._......%2B%29%29" class="RktStxLink" data-pltdoc="x">...+</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eand._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">proper-S/A-pattern</span><span class="hspace"> </span><span class="RktSym">...+</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eor._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="hspace"> </span><span class="RktSym">...+</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7enot%29%29" class="RktStxLink" data-pltdoc="x">~not</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVar">pattern-part</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">prefab-struct-key</span><span class="hspace"> </span><span class="RktVar">pattern-part</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVal">#&</span><span class="RktVar">S-pattern</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7erest%29%29" class="RktStxLink" data-pltdoc="x">~rest</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7edescribe._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">maybe-opaque</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7ecommit._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7edelimit-cut._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7epost._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">s</span></a><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">A-pattern</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">L-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">A-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">EH-pattern</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._......%2B%29%29" class="RktStxLink" data-pltdoc="x">...+</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7erest%29%29" class="RktStxLink" data-pltdoc="x">~rest</a></span><span class="hspace"> </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">H-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">pvar-id:splicing-syntax-class-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7evar._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktVar">splicing-syntax-class-id</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7evar._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktVar">splicing-syntax-class-id</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eand._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">proper-H/A-pattern</span><span class="hspace"> </span><span class="RktSym">...+</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eor._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktSym">...+</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eoptional._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">maybe-optional-option</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7edescribe._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">maybe-opaque</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7ecommit._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7edelimit-cut._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7epost._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">h</span></a><span class="hspace"> </span><span class="RktVar">H-patter</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek%29%29" class="RktStxLink" data-pltdoc="x">~peek</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek-not%29%29" class="RktStxLink" data-pltdoc="x">~peek-not</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">proper-S-pattern</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">EH-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a><span class="hspace"> </span><span class="RktVar">EH-pattern</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eonce%29%29" class="RktStxLink" data-pltdoc="x">~once</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">once-option</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eoptional._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">eh</span></a><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">optional-option</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ebetween%29%29" class="RktStxLink" data-pltdoc="x">~between</a></span><span class="hspace"> </span><span class="RktVar">H</span><span class="hspace"> </span><span class="RktVar">min-number</span><span class="hspace"> </span><span class="RktVar">max-number</span><span class="hspace"> </span><span class="RktVar">between-option</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">H-pattern</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">A-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ebind%29%29" class="RktStxLink" data-pltdoc="x">~bind</a></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVar">attr-arity-decl</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7efail%29%29" class="RktStxLink" data-pltdoc="x">~fail</a></span><span class="hspace"> </span><span class="RktVar">maybe-fail-condition</span><span class="hspace"> </span><span class="RktVar">maybe-message-expr</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eparse%29%29" class="RktStxLink" data-pltdoc="x">~parse</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="hspace"> </span><span class="RktVar">stx-expr</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7eand._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">a</span></a><span class="hspace"> </span><span class="RktVar">A-pattern</span><span class="hspace"> </span><span class="RktSym">...+</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><a href="#%28elem._%28pattern-link._%28~7epost._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">a</span></a><span class="hspace"> </span><span class="RktVar">A-pattern</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edo%29%29" class="RktStxLink" data-pltdoc="x">~do</a></span><span class="hspace"> </span><span class="RktVar">defn-or-expr</span><span class="hspace"> </span><span class="RktSym">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">proper-S-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline">a <span class="RktVar">S-pattern</span> that is not a <span class="RktVar">A-pattern</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="hspace"> </span><span class="RktVar">proper-H-pattern</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline">a <span class="RktVar">H-pattern</span> that is not a <span class="RktVar">S-pattern</span></td></tr></table></p><p>The following pattern keywords can be used in multiple pattern
variants:</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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7evar))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~var</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7evar._s-%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s-</span></a>, <a href="#%28elem._%28pattern-link._%28~7evar._s%2B%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s+</span></a>, or <a href="#%28elem._%28pattern-link._%28~7evar._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">h</span></a>.</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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7eand))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~and</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7eand._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">s</span></a>, <a href="#%28elem._%28pattern-link._%28~7eand._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">h</span></a>, or <a href="#%28elem._%28pattern-link._%28~7eand._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">a</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7eand._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">a</span></a> if all of the conjuncts are <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action patterns</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7eand._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">h</span></a> if any of the conjuncts is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper
head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7eand._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7eor))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~or</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7eor._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">s</span></a>, <a href="#%28elem._%28pattern-link._%28~7eor._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">h</span></a>, or <a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a> if the pattern occurs directly before ellipses
(<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span>) or immediately within another <a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a> pattern</p></li><li><p><a href="#%28elem._%28pattern-link._%28~7eor._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">h</span></a> if any of the disjuncts is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7eor._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7edescribe))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~describe</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7edescribe._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">s</span></a> or <a href="#%28elem._%28pattern-link._%28~7edescribe._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">h</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7edescribe._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">h</span></a> if the subpattern is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7edescribe._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7ecommit))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~commit</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7ecommit._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">s</span></a> or <a href="#%28elem._%28pattern-link._%28~7ecommit._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">h</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7ecommit._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">h</span></a> if the subpattern is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7ecommit._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7edelimit-cut))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~delimit-cut</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7edelimit-cut._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">s</span></a> or <a href="#%28elem._%28pattern-link._%28~7edelimit-cut._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">h</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7edelimit-cut._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">h</span></a> if the subpattern is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7edelimit-cut._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7epost))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epost%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~post</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7epost._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">s</span></a>, <a href="#%28elem._%28pattern-link._%28~7epost._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">h</span></a>, or <a href="#%28elem._%28pattern-link._%28~7epost._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">a</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7epost._a%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">a</span></a> if the subpattern is an <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7epost._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">h</span></a> if the subpattern is a <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head pattern</span></a></p></li><li><p><a href="#%28elem._%28pattern-link._%28~7epost._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">s</span></a> otherwise</p></li></ul></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>syntax</p></div></div><p class="RForeground"><a name="(form._((lib._syntax/parse..rkt)._~7eoptional))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~optional</a></span></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">One of <a href="#%28elem._%28pattern-link._%28~7eoptional._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">h</span></a> or <a href="#%28elem._%28pattern-link._%28~7eoptional._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">eh</span></a>:
</div><div class="SIntrapara"><ul><li><p><a href="#%28elem._%28pattern-link._%28~7eoptional._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">eh</span></a> if it is an immediate disjunct of a <a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a> pattern</p></li><li><p><a href="#%28elem._%28pattern-link._%28~7eoptional._h%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~optional</span><span style="vertical-align: super; font-size: 80%">h</span></a> otherwise</p></li></ul></div></p><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Single-term_Patterns"">1.5.1<tt> </tt><a name="(part._.Single-term_.Patterns)"></a>Single-term Patterns</h5><p>A <a name="(tech._single._term._pattern)"></a><span style="font-style: italic">single-term pattern</span> (abbreviated <span class="RktVar">S-pattern</span>) is a pattern that
describes a single term. These are like the traditional patterns used
in <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax-rules%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">syntax-rules</a></span> and <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax-case%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">syntax-case</a></span>, but with additional
variants that make them more expressive.</p><p>“Single-term” does not mean “atomic”; a single-term pattern can have
complex structure, and it can match terms that have many parts. For
example, <span class="RktPn">(</span><span class="RktVal">17</span><span class="stt"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span> is a single-term pattern that matches any
term that is a proper list of repeated <span class="RktRes">17</span> numerals.</p><p>A <a name="(tech._proper._single._term._pattern)"></a><span style="font-style: italic">proper single-term pattern</span> is one that is not an <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action pattern</span></a>.</p><p>The <a name="(tech._list._pattern)"></a><span style="font-style: italic">list patterns</span> (for “list pattern”) are single-term patterns
having a restricted structure that guarantees that they match only
terms that are proper lists.</p><p>Here are the variants of single-term pattern:</p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVar">id</span></td></tr></table></blockquote><p>An identifier can be either a <a href="#%28tech._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern variable</span></a>, an
<a href="#%28tech._annotated._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">annotated pattern variable</span></a>, or a <a href="#%28tech._literal%29" class="techoutside" data-pltdoc="x"><span class="techinside">literal</span></a>:</p><ul><li><p>If <span class="RktVar">id</span> is the “pattern” name of an entry in the
literals list, it is a <a href="#%28tech._literal%29" class="techoutside" data-pltdoc="x"><span class="techinside">literal</span></a> pattern that behaves
like <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="RktPn">)</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">lambda: expected the identifier `define'</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: lambda</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (lambda x 12)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">def</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">def</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">def</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">def</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">lambda: expected the identifier `define'</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: lambda</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (lambda x 12)</span></p></td></tr></table></blockquote></div></p></li><li><p>If <span class="RktVar">id</span> is of the form <span class="RktVar">pvar-id:syntax-class-id</span>
(that is, two names joined by a colon character), it is an
<a href="#%28tech._annotated._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">annotated pattern variable</span></a>, and the pattern is equivalent to
<span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="stt"> </span><span class="RktVar">pvar-id</span><span class="stt"> </span><span class="RktVar">syntax-class-id</span><span class="RktPn">)</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">a</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">var</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'a</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">12</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">var</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">?: expected identifier</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 12</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: 12</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">two</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">t:two</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">t</span><span class="hspace"> </span><span class="RktSym">t.x</span><span class="hspace"> </span><span class="RktSym">t.y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((a<span class="stt"> </span>b)<span class="stt"> </span>a<span class="stt"> </span>b)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">t</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:declare</span><span class="hspace"> </span><span class="RktSym">t</span><span class="hspace"> </span><span class="RktSym">two</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">t</span><span class="hspace"> </span><span class="RktSym">t.x</span><span class="hspace"> </span><span class="RktSym">t.y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((a<span class="stt"> </span>b)<span class="stt"> </span>a<span class="stt"> </span>b)</span></p></td></tr></table></blockquote></div></p><p>Note that an <span class="RktVar">id</span> of the form <span class="RktVar">:syntax-class-id</span> is
legal; see the discussion of a <a href="#%28elem._%28pattern-link._%28~7evar._s%2B%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~var</span><span style="vertical-align: super; font-size: 80%">s+</span></a> form with a zero-length
<span class="RktVar">pvar-id</span>.</p></li><li><p>If <span class="RktVar">id</span> is of the form <span class="RktVar">pvar-id:literal-id</span>,
where <span class="RktVar">literal-id</span> is in the literals list, then it is
equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="stt"> </span><span class="RktVar">pvar-id</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">literal-id</span><span class="RktPn">)</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._require%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">require</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=require.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._only-in%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">only-in</a></span><span class="hspace"> </span><span class="RktSym">racket/base</span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">def</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">def</span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">7</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">d:define</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">d</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:11:0 def></span></p></td></tr></table></blockquote></div></p></li><li><p>Otherwise, <span class="RktVar">id</span> is a <a href="#%28tech._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern variable</span></a>, and the
pattern is equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="stt"> </span><span class="RktVar">id</span><span class="RktPn">)</span>.</p></li></ul></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7evar._s-)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktVar">pvar-id</span><span class="RktPn">)</span></td></tr></table></blockquote><p>A <a name="(tech._pattern._variable)"></a><span style="font-style: italic">pattern variable</span>. If <span class="RktVar">pvar-id</span> has no syntax class
(by <span class="RktPn">#:convention</span>), the pattern variable matches anything. The
pattern variable is bound to the matched subterm, unless the pattern
variable is the wildcard (<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span>), in which case no binding
occurs.</p><p>If <span class="RktVar">pvar-id</span> does have an associated syntax class, it behaves
like an <a href="#%28tech._annotated._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">annotated pattern variable</span></a> with the implicit syntax
class inserted.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7evar._s+)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktVar">pvar-id</span><span class="hspace"> </span><span class="RktVar">syntax-class-use</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">syntax-class-use</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">syntax-class-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">syntax-class-id</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-role</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:role</span><span class="hspace"> </span><span class="RktVar">role-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">role-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>An <a name="(tech._annotated._pattern._variable)"></a><span style="font-style: italic">annotated pattern variable</span>. The pattern matches only
terms accepted by <span class="RktVar">syntax-class-id</span> (parameterized by the
<span class="RktVar">arg</span>s, if present).</p><p>In addition to binding <span class="RktVar">pvar-id</span>, an annotated pattern
variable also binds <a name="(tech._nested._attribute)"></a><span style="font-style: italic">nested attributes</span> from the syntax
class. The names of the nested attributes are formed by prefixing
<span class="RktVar">pvar-id.</span> (that is, <span class="RktVar">pvar-id</span> followed by a “dot”
character) to the name of the syntax class’s attribute.</p><p>If <span class="RktVar">pvar-id</span> is <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span>, no attributes are bound. If
<span class="RktVar">pvar-id</span> is the zero-length identifier (<span class="RktSym">||</span>), then
<span class="RktVar">pvar-id</span> is not bound, but the nested attributes of
<span class="RktVar">syntax-class-use</span> are bound without prefixes.</p><p>If <span class="RktVar">role-expr</span> is given and evaluates to a string, it is
combined with the syntax class’s description in error messages.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">a</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktSym">var</span><span class="hspace"> </span><span class="RktSym"><a href="Library_Syntax_Classes_and_Literal_Sets.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._id%29%29" class="RktStxLink" data-pltdoc="x">id</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">var</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'a</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">12</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktSym">var</span><span class="hspace"> </span><span class="RktSym"><a href="Library_Syntax_Classes_and_Literal_Sets.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._id%29%29" class="RktStxLink" data-pltdoc="x">id</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">var</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">?: expected identifier</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 12</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: 12</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">two</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:attributes</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktSym">t</span><span class="hspace"> </span><span class="RktSym">two</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">t</span><span class="hspace"> </span><span class="RktSym">t.x</span><span class="hspace"> </span><span class="RktSym">t.y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((a<span class="stt"> </span>b)<span class="stt"> </span>a<span class="stt"> </span>b)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-syntax-class</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">nat-less-than</span><span class="hspace"> </span><span class="RktSym">n</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktSym">x:nat</span><span class="hspace"> </span><span class="RktPn">#:when</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=generic-numbers.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._%7E3c%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x"><</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-e%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-e</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">n</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktSym">small</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">nat-less-than</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktSym">large:nat</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">small</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">large</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(#<syntax:17:0 (1 2 3)><span class="stt"> </span>#<syntax:17:0 (4 5)>)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym"><a href="Library_Syntax_Classes_and_Literal_Sets.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._id%29%29" class="RktStxLink" data-pltdoc="x">id</a></span><span class="hspace"> </span><span class="RktPn">#:role</span><span class="hspace"> </span><span class="RktVal">"variable"</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">m: expected identifier for variable</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 3</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (m a b 3)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7eliteral))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~literal</a></span></span><span class="hspace"> </span><span class="RktVar">literal-id</span><span class="hspace"> </span><span class="RktVar">maybe-phase</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-phase</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:phase</span><span class="hspace"> </span><span class="RktVar">phase-expr</span></td></tr></table></td></tr></table></blockquote><p>A <a name="(tech._literal)"></a><span style="font-style: italic">literal</span> identifier pattern. Matches any identifier
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxcmp.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._free-identifier%7E3d%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">free-identifier=?</a></span> to <span class="RktVar">literal-id</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktVal">12</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">body:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">lambda: expected the identifier `define'</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: lambda</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (lambda x 12)</span></p></td></tr></table></blockquote></div></p><p>The identifiers are compared at the phase given by
<span class="RktVar">phase-expr</span>, if it is given, or
<span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxtrans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-local-phase-level%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-local-phase-level</a></span><span class="RktPn">)</span> otherwise.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVar">atomic-datum</span></td></tr></table></blockquote><p>Numbers, strings, booleans, keywords, and the empty list match as
literals.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">bar</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'bar</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">foo</span><span class="hspace"> </span><span class="RktSym">bar</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">a: expected the literal #:foo</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: foo</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (a foo bar)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7edatum))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~datum</a></span></span><span class="hspace"> </span><span class="RktVar">datum</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches syntax whose S-expression contents (obtained by
<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span>) is <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._equal%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">equal?</a></span> to the given
<span class="RktVar">datum</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">bar</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxLink" data-pltdoc="x">~datum</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'bar</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">foo</span><span class="hspace"> </span><span class="RktSym">bar</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxLink" data-pltdoc="x">~datum</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">a: expected the literal #:foo</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: foo</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (a foo bar)</span></p></td></tr></table></blockquote></div></p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxLink" data-pltdoc="x">~datum</a></span> form is useful for recognizing identifiers
symbolically, in contrast to the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span> form, which
recognizes them by binding.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">something-else</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edatum%29%29" class="RktStxLink" data-pltdoc="x">~datum</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">e:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">yes</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">no</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'yes</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">something-else</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eliteral%29%29" class="RktStxLink" data-pltdoc="x">~literal</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">var:id</span><span class="hspace"> </span><span class="RktSym">e:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">yes</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">no</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'yes</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches any term that can be decomposed into a list prefix matching
<span class="RktVar">H-pattern</span> and a suffix matching <span class="RktVar">S-pattern</span>.</p><p>Note that the pattern may match terms that are not even improper
lists; if the head pattern can match a zero-length head, then the
whole pattern matches whatever the tail pattern accepts.</p><p>The first pattern can be a <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a>, in which case the whole
pattern matches any pair whose first element matches the first pattern
and whose rest matches the second.</p><p>See <a href="#%28tech._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">head patterns</span></a> for more information.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktVar">A-pattern</span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Performs the actions specified by <span class="RktVar">A-pattern</span>, then matches
any term that matches <span class="RktVar">S-pattern</span>.</p><p>Pragmatically, one can throw an <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action pattern</span></a> into any list
pattern. Thus, <span class="RktPn">(</span><span class="RktSym">x</span><span class="stt"> </span><span class="RktSym">y</span><span class="stt"> </span><span class="RktSym">z</span><span class="RktPn">)</span> is a pattern matching a list of three
terms, and <span class="RktPn">(</span><span class="RktSym">x</span><span class="stt"> </span><span class="RktSym">y</span><span class="stt"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span><span class="stt"> </span><span class="RktSym">z</span><span class="RktPn">)</span> is a pattern matching a list of three
terms, with a <a href="#%28tech._cut%29" class="techoutside" data-pltdoc="x"><span class="techinside">cut</span></a> performed after the second one. In other
words, action patterns “don’t take up space.”</p><p>See <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action patterns</span></a> for more information.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktVar">EH-pattern</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches any term that can be decomposed into a list head matching some
number of repetitions of the <span class="RktVar">EH-pattern</span> alternatives (subject
to its repetition constraints) followed by a list tail matching
<span class="RktVar">S-pattern</span>.</p><p>In other words, the whole pattern matches either the second pattern
(which need not be a list) or a term whose head matches one of the
alternatives of the first pattern and whose tail recursively matches
the whole sequence pattern.</p><p>See <a href="#%28tech._ellipsis._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">ellipsis-head patterns</span></a> for more information.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><span class="RktVar">H-pattern</span><span class="hspace"> </span><a name="(form._((lib._syntax/parse..rkt)._......+))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._......%2B%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">...+</a></span></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like an ellipses (<span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span>) pattern, but requires at least one occurrence
of the head pattern to be present.</p><p><div class="SIntrapara">That is, the following patterns are equivalent:
</div><div class="SIntrapara"><ul><li><p><span class="RktPn">(</span><span class="RktSym">H</span><span class="stt"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._......%2B%29%29" class="RktStxLink" data-pltdoc="x">...+</a></span><span class="stt"> </span><span class="RktPn">. </span><span class="RktSym">S</span><span class="RktPn">)</span></p></li><li><p><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ebetween%29%29" class="RktStxLink" data-pltdoc="x">~between</a></span><span class="stt"> </span><span class="RktSym">H</span><span class="stt"> </span><span class="RktVal">1</span><span class="stt"> </span><span class="RktVal">+inf.0</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="stt"> </span><span class="RktPn">. </span><span class="RktSym">S</span><span class="RktPn">)</span></p></li></ul></div></p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n:nat</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n:nat</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">none</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'none</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eand._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktVar">S/A-pattern</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches any term that matches all of the subpatterns.</p><p>The subpatterns can contain a mixture of <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term patterns</span></a> and
<a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action patterns</span></a>, but must contain at least one <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a>.</p><p>Attributes bound in subpatterns are available to subsequent
subpatterns. The whole pattern binds all of the subpatterns’
attributes.</p><p>One use for <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span>-patterns is preserving a whole
term (including its lexical context, source location, etc) while also
examining its structure. Syntax classes are useful for the same
purpose, but <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span> can be lighter weight.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-syntax%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntax</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">import</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._raise-syntax-error%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">raise-syntax-error</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">"illegal use of import"</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">check-imports</span><span class="hspace"> </span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">....</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">import</span><span class="hspace"> </span><span class="RktSym">one</span><span class="hspace"> </span><span class="RktSym">two</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">import</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktSym">import-clause</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">import</span><span class="hspace"> </span><span class="RktSym">i</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=let.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._let%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">let</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">bad</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">check-imports</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3elist%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->list</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">i</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=when_unless.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._when%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">when</a></span><span class="hspace"> </span><span class="RktSym">bad</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=exns.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._raise-syntax-error%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">raise-syntax-error</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">#f</span><span class="hspace"> </span><span class="RktVal">"bad import"</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">import-clause</span><span class="hspace"> </span><span class="RktSym">bad</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eor._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches any term that matches one of the included patterns. The
alternatives are tried in order.</p><p>The whole pattern binds <span style="font-style: italic">all</span> of the subpatterns’ attributes. An
attribute that is not bound by the “chosen” subpattern has a value
of <span class="RktVal">#f</span>. The same attribute may be bound by multiple
subpatterns, and if it is bound by all of the subpatterns, it is sure
to have a value if the whole pattern matches.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">a</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:nat</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:32:0 a></span></p></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:nat</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:33:0 a></span></p></td></tr><tr><td><p><span class="RktRes">#<syntax:33:0 1></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:nat</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=values.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._values%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">values</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:34:0 b></span></p></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7enot))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7enot%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~not</a></span></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches any term that does not match the subpattern. None of the
subpattern’s attributes are bound outside of the
<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7enot%29%29" class="RktStxLink" data-pltdoc="x">~not</a></span>-pattern.</p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="hspace"> </span><span class="RktSym">z</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._%7E3d%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">=></a></span><span class="hspace"> </span><span class="RktSym">u</span><span class="hspace"> </span><span class="RktSym">v</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._%7E3d%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">=></a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktSym">before</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7enot%29%29" class="RktStxLink" data-pltdoc="x">~not</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._%7E3d%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">=></a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=if.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fletstx-scheme..rkt%2529._%7E3d%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">=></a></span><span class="hspace"> </span><span class="RktSym">after</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._list%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">list</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">before</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">after</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(#<syntax:35:0 (x y z)><span class="stt"> </span>#<syntax:35:0 (u v)>)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVar">pattern-part</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr></table></blockquote><p>Matches a term that is a vector whose elements, when considered as a
list, match the <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a> corresponding to
<span class="RktPn">(</span><span class="RktSym">pattern-part</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">y</span><span class="hspace"> </span><span class="RktVal">z</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">z</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">3</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">y</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">y</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">~rest</span><span class="hspace"> </span><span class="RktVal">y</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">prefab-struct-key</span><span class="hspace"> </span><span class="RktVar">pattern-part</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span></td></tr></table></blockquote><p>Matches a term that is a prefab struct whose key is exactly the given
key and whose sequence of fields, when considered as a list, match the
<a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a> corresponding to <span class="RktPn">(</span><span class="RktSym">pattern-part</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">y</span><span class="hspace"> </span><span class="RktVal">z</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">y</span><span class="hspace"> </span><span class="RktVal">...</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">y</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#s</span><span class="RktVal">(</span><span class="RktVal">point</span><span class="hspace"> </span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">~rest</span><span class="hspace"> </span><span class="RktVal">y</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVal">#&</span><span class="RktVar">S-pattern</span></td></tr></table></blockquote><p>Matches a term that is a box whose contents matches the inner
<a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term pattern</span></a>.</p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#&</span><span class="RktVal">5</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#&</span><span class="RktVal">n:nat</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7erest))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7erest%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~rest</a></span></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches just like <span class="RktVar">S-pattern</span>. The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7erest%29%29" class="RktStxLink" data-pltdoc="x">~rest</a></span> pattern form
is useful in positions where improper (“dotted”) lists are not
allowed by the reader, such as vector and structure patterns (see
above).</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7erest%29%29" class="RktStxLink" data-pltdoc="x">~rest</a></span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktVal">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">x</span><span class="hspace"> </span><span class="RktVal">~rest</span><span class="hspace"> </span><span class="RktVal">y</span><span class="RktVal">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'(2<span class="stt"> </span>3)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7edescribe._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="hspace"> </span><span class="RktVar">maybe-opaque</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-opaque</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:opaque</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-role</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:role</span><span class="hspace"> </span><span class="RktVar">role-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><blockquote class="SubFlow"><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">role-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote><p>The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span> pattern form annotates a pattern with a
description, a string expression that is evaluated in the scope of all
prior attribute bindings. If parsing the inner pattern fails, then the
description is used to synthesize the error message. A
<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span> pattern does not influence backtracking.</p><p>If <span class="RktPn">#:opaque</span> is given, failure information from within
<span class="RktVar">S-pattern</span> is discarded and the error is reported solely in
terms of the description given.</p><p>If <span class="RktVar">role-expr</span> is given and produces a string, its value is
combined with the description in error messages.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktVal">"id pair"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">m: expected id pair</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 1</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (m 1)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktVal">"id pair"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">m: expected identifier</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 2</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (m (a 2))</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">parsing context: </span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">while parsing id pair</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">term: (a 2)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">location: eval:46.0</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktPn">#:opaque</span><span class="hspace"> </span><span class="RktVal">"id pair"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">m: expected id pair</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: (a 2)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (m (a 2))</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktPn">#:role</span><span class="hspace"> </span><span class="RktVal">"formals"</span><span class="hspace"> </span><span class="RktVal">"id pair"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">m: expected id pair for formals</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 1</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (m 1)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7ecommit._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern form affects backtracking in two ways:</p><ul><li><p>If the pattern succeeds, then all choice points created within
the subpattern are discarded, and a failure <span style="font-style: italic">after</span> the
<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern backtracks only to choice points
<span style="font-style: italic">before</span> the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern, never one <span style="font-style: italic">within</span>
it.</p></li><li><p>A cut (<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span>) within a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern only
eliminates choice-points created within the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span>
pattern. In this sense, it acts just like <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span>.</p></li></ul></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7edelimit-cut._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>The <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span> pattern form affects backtracking in the
following way:</p><ul><li><p>A cut (<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span>) within a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span> pattern only
eliminates choice-points created within the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span>
pattern.</p></li></ul></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7epost._s)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epost%29%29" class="RktStxLink" data-pltdoc="x">~post</a></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Marks failures within the subpattern as occurring in a “post-order
check”; that is, they are considered to have made greater progress
than a normal failure.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVar">A-pattern</span></td></tr></table></blockquote><p>An <a href="#%28tech._action._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">action pattern</span></a> is considered a single-term pattern when there is no
ambiguity; it matches any term.</p></blockquote><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Head_Patterns"">1.5.2<tt> </tt><a name="(part._.Head_.Patterns)"></a>Head Patterns</h5><p>A <a name="(tech._head._pattern)"></a><span style="font-style: italic">head pattern</span> (abbreviated <span class="RktVar">H-pattern</span>) is a pattern that
describes some number of terms that occur at the head of some list
(possibly an improper list). A head pattern’s usefulness comes from being
able to match heads of different lengths, such as optional forms like
keyword arguments.</p><p>A <a name="(tech._proper._head._pattern)"></a><span style="font-style: italic">proper head pattern</span> is a head pattern that is not a single-term pattern.</p><p>Here are the variants of head pattern:</p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVar">pvar-id:splicing-syntax-class-id</span></td></tr></table></blockquote><p>Equivalent to <span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="stt"> </span><span class="RktSym">pvar-id</span><span class="stt"> </span><span class="RktSym">splicing-syntax-class-id</span><span class="RktPn">)</span>.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7evar._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7evar%29%29" class="RktStxLink" data-pltdoc="x">~var</a></span><span class="hspace"> </span><span class="RktVar">pvar-id</span><span class="hspace"> </span><span class="RktVar">splicing-syntax-class-use</span><span class="hspace"> </span><span class="RktVar">maybe-role</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">splicing-syntax-class-use</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">splicing-syntax-class-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">splicing-syntax-class-id</span><span class="hspace"> </span><span class="RktVar">arg</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-role</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:role</span><span class="hspace"> </span><span class="RktVar">role-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">role-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>Pattern variable annotated with a <a href="stxparse-specifying.html#%28tech._splicing._syntax._clas%29" class="techoutside" data-pltdoc="x"><span class="techinside">splicing syntax
class</span></a>. Similar to a normal <a href="#%28tech._annotated._pattern._variable%29" class="techoutside" data-pltdoc="x"><span class="techinside">annotated pattern variable</span></a>, except
matches a head pattern.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7eseq))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~seq</a></span></span><span class="hspace"> </span><span class="RktPn">. </span><span class="RktVar">L-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches a sequence of terms whose elements, if put in a list, would
match <span class="RktVar">L-pattern</span>.</p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">4</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr></table></blockquote></div></p><p>See also the section on <a href="#%28tech._ellipsis._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">ellipsis-head patterns</span></a> for more interesting
examples of <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span>.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eand._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7eand._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~and</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a sequence of
terms instead.</p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">k:keyword</span><span class="hspace"> </span><span class="RktSym">e:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym">positional-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'((#:a<span class="stt"> </span>#:b)<span class="stt"> </span>(1<span class="stt"> </span>2)<span class="stt"> </span>(#:a<span class="stt"> </span>1<span class="stt"> </span>#:b<span class="stt"> </span>2))</span></p></td></tr></table></blockquote></div></p><p>The head pattern variant of <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span> requires that all of the
subpatterns be <a href="#%28tech._proper._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">proper head patterns</span></a> (not <a href="#%28tech._single._term._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">single-term patterns</span></a>). This
is to prevent typos like the following, a variant of the previous
example with the second <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span> omitted:</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">k:keyword</span><span class="hspace"> </span><span class="RktSym">e:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym">positional-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">syntax-parse: single-term pattern not allowed after head</span></p></td></tr><tr><td><p><span class="RktErr">pattern</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: (keyword-stuff ...)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (syntax-parse (syntax (#:a 1 #:b 2 3 4 5)) (((~and</span></p></td></tr><tr><td><p><span class="RktErr">(~seq (~seq k:keyword e:expr) ...) (keyword-stuff ...))</span></p></td></tr><tr><td><p><span class="RktErr">positional-stuff ...) (syntax->datum (syntax ((k ...) (e</span></p></td></tr><tr><td><p><span class="RktErr">...) (keyword-stuff ...))))))</span></p></td></tr><tr><td><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">If the example above were allowed, it would be equivalent to this:</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktVal">4</span><span class="hspace"> </span><span class="RktVal">5</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">k:keyword</span><span class="hspace"> </span><span class="RktSym">e:expr</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktSym">positional-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">k</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">e</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">keyword-stuff</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">?: bad syntax</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (#:a 1 #:b 2 3 4 5)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eor._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7eor._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a sequence of
terms instead.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:53:0 2></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eoptional._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">maybe-optional-option</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-optional-option</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVar">attr-arity-decl</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">attr-arity-decl</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">attr-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">attr-id</span><span class="hspace"> </span><span class="RktVar">depth</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>Matches either the given head subpattern or an empty sequence of
terms. If the <span class="RktPn">#:defaults</span> option is given, the subsequent
attribute bindings are used if the subpattern does not match. The
default attributes must be a subset of the subpattern’s attributes.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#f</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:55:0 2></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktVal">#f</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:56:0 #f></span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:foo</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">y:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._attribute%29%29" class="RktStxLink" data-pltdoc="x">attribute</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">m</span><span class="hspace"> </span><span class="RktPn">#:syms</span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:nums</span><span class="hspace"> </span><span class="RktSym">n:nat</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">null</a></span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:syms</span><span class="hspace"> </span><span class="RktSym">s:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">s</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=pairs.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._null%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">null</a></span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym">n</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">s</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#<syntax:58:0 (() (a b c))></span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7edescribe._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span><span class="hspace"> </span><span class="RktVar">expr</span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7edescribe._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~describe</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a head
pattern instead.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7ecommit._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7ecommit._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~commit</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a head
pattern instead.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7edelimit-cut._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7edelimit-cut._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~delimit-cut</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a head
pattern instead.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7epost._h)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epost%29%29" class="RktStxLink" data-pltdoc="x">~post</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7epost._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a head
pattern instead.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7epeek))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~peek</a></span></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches the <span class="RktVar">H-pattern</span> but then resets the matching position,
so the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek%29%29" class="RktStxLink" data-pltdoc="x">~peek</a></span> pattern consumes no input. Used to look ahead in
a sequence.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-splicing-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-splicing-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">nf-id</span><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">non-final id</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek%29%29" class="RktStxLink" data-pltdoc="x">~peek</a></span><span class="hspace"> </span><span class="RktSym">another:id</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">n:nf-id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="hspace"> </span><span class="RktSym">rest</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"nf-ids are ~s\n"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">n.x</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"rest is ~s\n"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">rest</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktOut">nf-ids are (a b)</span></p></td></tr><tr><td><p><span class="RktOut">rest is (c 1 2 3)</span></p></td></tr></table></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7epeek-not))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek-not%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~peek-not</a></span></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek%29%29" class="RktStxLink" data-pltdoc="x">~peek</a></span>, but succeeds if the subpattern fails and fails if
the subpattern succeeds. On success, the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek-not%29%29" class="RktStxLink" data-pltdoc="x">~peek-not</a></span> resets the
matching position, so the pattern consumes no input. Used to look
ahead in a sequence. None of the subpattern’s attributes are bound
outside of the <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek-not%29%29" class="RktStxLink" data-pltdoc="x">~peek-not</a></span>-pattern.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._define-splicing-syntax-class%29%29" class="RktStxLink" data-pltdoc="x">define-splicing-syntax-class</a></span><span class="hspace"> </span><span class="RktSym">final</span><span class="hspace"> </span><span class="RktCmt">;</span><span class="RktCmt"> </span><span class="RktCmt">final term</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="stxparse-specifying.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._pattern%29%29" class="RktStxLink" data-pltdoc="x">pattern</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">x</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epeek-not%29%29" class="RktStxLink" data-pltdoc="x">~peek-not</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529.__%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">_</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktSym">c</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktSym">f:final</span><span class="hspace"> </span><span class="RktSym">other</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"finals are ~s\n"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">f.x</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"others are ~s\n"</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-%7E3edatum%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax->datum</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym">other</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktOut">finals are (c)</span></p></td></tr><tr><td><p><span class="RktOut">others are (a b)</span></p></td></tr></table></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktVar">S-pattern</span></td></tr></table></blockquote><p>Matches a sequence of one element, which must be a term matching
<span class="RktVar">S-pattern</span>.</p></blockquote><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Ellipsis-head_Patterns"">1.5.3<tt> </tt><a name="(part._.Ellipsis-head_.Patterns)"></a>Ellipsis-head Patterns</h5><p>An <a name="(tech._ellipsis._head._pattern)"></a><span style="font-style: italic">ellipsis-head pattern</span> (abbreviated <span class="RktVar">EH-pattern</span>) is pattern
that describes some number of terms, like a <a href="#%28tech._head._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">head pattern</span></a>, but also
places constraints on the number of times it occurs in a
repetition. They are useful for matching, for example, keyword
arguments where the keywords may come in any order. Multiple
alternatives are grouped together via <a href="#%28elem._%28pattern-link._%28~7eor._eh%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~or</span><span style="vertical-align: super; font-size: 80%">eh</span></a>.</p><p><div class="SIntrapara">Examples:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define</a></span><span class="hspace"> </span><span class="RktSym">parser1</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parser%29%29" class="RktStxLink" data-pltdoc="x">syntax-parser</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eonce%29%29" class="RktStxLink" data-pltdoc="x">~once</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVal">"#:a keyword"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVal">"#:b keyword"</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktSym">z</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parser1</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parser1</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:b</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">3</span><span class="hspace"> </span><span class="RktPn">#:c</span><span class="hspace"> </span><span class="RktVal">25</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">hi</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'ok</span></p></td></tr><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym">parser1</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktPn">#:a</span><span class="hspace"> </span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktErr">?: too many occurrences of #:a keyword</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: ()</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">within: (#:a 1 #:a 2)</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (#:a 1 #:a 2)</span></p></td></tr></table></blockquote></div></p><p>The pattern requires exactly one occurrence of the <span class="RktPn">#:a</span>
keyword and argument, at most one occurrence of the <span class="RktPn">#:b</span>
keyword and argument, and any number of <span class="RktPn">#:c</span> keywords and
arguments. The “pieces” can occur in any order.</p><p>Here are the variants of ellipsis-head pattern:</p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eor._eh)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eor%29%29" class="RktStxLink" data-pltdoc="x">~or</a></span><span class="hspace"> </span><span class="RktVar">EH-pattern</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Matches if any of the inner <span class="RktVar">EH-pattern</span> alternatives match.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7eonce))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eonce%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~once</a></span></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">once-option</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">once-option</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVar">name-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:too-few</span><span class="hspace"> </span><span class="RktVar">too-few-message-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:too-many</span><span class="hspace"> </span><span class="RktVar">too-many-message-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><blockquote class="SubFlow"><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">name-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">too-few-message-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">too-many-message-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote><p>Matches if the inner <span class="RktVar">H-pattern</span> matches. This pattern must be
matched exactly once in the match of the entire repetition sequence.</p><p>If the pattern is not matched in the repetition sequence, then the
ellipsis pattern fails with the message either
<span class="RktVar">too-few-message-expr</span> or <span class="RktVal">"missing required
occurrence of <span class="RktVar">name-expr</span>"</span>.</p><p>If the pattern is chosen more than once in the repetition sequence,
then the ellipsis pattern fails with the message either
<span class="RktVar">too-many-message-expr</span> or <span class="RktVal">"too many occurrences
of <span class="RktVar">name-expr</span>"</span>.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eoptional._eh)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">optional-option</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">optional-option</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVar">name-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:too-many</span><span class="hspace"> </span><span class="RktVar">too-many-message-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:defaults</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVar">attr-id</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><blockquote class="SubFlow"><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">name-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">too-many-message-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote><p>Matches if the inner <span class="RktVar">H-pattern</span> matches. This pattern may be used at
most once in the match of the entire repetition.</p><p>If the pattern is matched more than once in the repetition sequence,
then the ellipsis pattern fails with the message either
<span class="RktVar">too-many-message-expr</span> or <span class="RktVal">"too many occurrences
of <span class="RktVar">name-expr</span>"</span>.</p><p>If the <span class="RktPn">#:defaults</span> option is given, the following attribute
bindings are used if the subpattern does not match at all in the
sequence. The default attributes must be a subset of the subpattern’s
attributes.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7ebetween))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ebetween%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~between</a></span></span><span class="hspace"> </span><span class="RktVar">H-pattern</span><span class="hspace"> </span><span class="RktVar">min-number</span><span class="hspace"> </span><span class="RktVar">max-number</span><span class="hspace"> </span><span class="RktVar">between-option</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">reps-option</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:name</span><span class="hspace"> </span><span class="RktVar">name-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:too-few</span><span class="hspace"> </span><span class="RktVar">too-few-message-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:too-many</span><span class="hspace"> </span><span class="RktVar">too-many-message-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><blockquote class="SubFlow"><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">name-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">too-few-message-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote><p>Matches if the inner <span class="RktVar">H-pattern</span> matches. This pattern must be
matched at least <span class="RktVar">min-number</span> and at most <span class="RktVar">max-number</span>
times in the entire repetition.</p><p>If the pattern is matched too few times, then the ellipsis pattern
fails with the message either <span class="RktVar">too-few-message-expr</span> or
<span class="RktVal">"too few occurrences of <span class="RktVar">name-expr</span>"</span>, when
<span class="RktVar">name-expr</span> is provided.</p><p>If the pattern is chosen too many times, then the ellipsis pattern
fails with the message either <span class="RktVar">too-many-message-expr</span> or
<span class="RktVal">"too many occurrences of <span class="RktVar">name-expr</span>"</span>, when
<span class="RktVar">name-expr</span> is provided.</p></blockquote><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Action_Patterns"">1.5.4<tt> </tt><a name="(part._.Action_.Patterns)"></a>Action Patterns</h5><p>An <a name="(tech._action._pattern)"></a><span style="font-style: italic">action pattern</span> (abbreviated <span class="RktVar">A-pattern</span>) does not
describe any syntax; rather, it has an effect such as the binding of
attributes or the modification of the matching process.</p><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><a name="(form._((lib._syntax/parse..rkt)._~7e!))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~!</a></span></span></td></tr></table></blockquote><p>The <a name="(tech._cut)"></a><span style="font-style: italic">cut</span> operator, written <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span>, eliminates
backtracking choice points and commits parsing to the current branch
of the pattern it is exploring.</p><p>Common opportunities for cut-patterns come from recognizing special
forms based on keywords. Consider the following expression:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktVal">123</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-syntaxes%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntaxes</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-values</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-syntaxes%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntaxes</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-syntaxes</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">e</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">expression</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">'expression</span></p></td></tr></table></blockquote><p>Given the ill-formed term <span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="stt"> </span><span class="RktSym">a</span><span class="stt"> </span><span class="RktVal">123</span><span class="RktPn">)</span>,
<span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span> tries the first clause, fails to match
<span class="RktSym">a</span> against the pattern <span class="RktPn">(</span><span class="RktSym">x:id</span><span class="stt"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span>, and then
backtracks to the second clause and ultimately the third clause,
producing the value <span class="RktVal">'</span><span class="RktVal">expression</span>. But the term is not an
expression; it is an ill-formed use of <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span>. The
proper way to write the <span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span> expression follows:</p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktVal">123</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">#:literals</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-syntaxes%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntaxes</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-values</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-syntaxes%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntaxes</a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">x:id</span><span class="hspace"> </span><span class="RktMeta"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">e</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">define-syntaxes</span><span class="RktPn">]</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktSym">e</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">expression</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktErr">define-values: bad syntax</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (define-values a 123)</span></p></td></tr></table></blockquote><p>Now, given the same term, <span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span> tries the first
clause, and since the keyword <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._define-values%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-values</a></span> matches, the
cut-pattern commits to the current pattern, eliminating the choice
points for the second and third clauses. So when the clause fails to
match, the <span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span> expression raises an error.</p><p>The effect of a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span> pattern is delimited by the nearest
enclosing <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span> or <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern. If there
is no enclosing <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edescribe%29%29" class="RktStxLink" data-pltdoc="x">~describe</a></span> pattern but the cut occurs within a
syntax class definition, then only choice points within the syntax
class definition are discarded. A <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7e%21%29%29" class="RktStxLink" data-pltdoc="x">~!</a></span> pattern is not allowed
within a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7enot%29%29" class="RktStxLink" data-pltdoc="x">~not</a></span> pattern unless there is an intervening
<span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edelimit-cut%29%29" class="RktStxLink" data-pltdoc="x">~delimit-cut</a></span> or <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ecommit%29%29" class="RktStxLink" data-pltdoc="x">~commit</a></span> pattern.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7ebind))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7ebind%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~bind</a></span></span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktVar">attr-arity-decl</span><span class="hspace"> </span><span class="RktVar">expr</span><span class="RktPn">]</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">attr-arity-decl</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">attr-name-id</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">(</span><span class="RktVar">attr-name-id</span><span class="hspace"> </span><span class="RktVar">depth</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>Evaluates the <span class="RktVar">expr</span>s and binds them to the given
<span class="RktSym">attr-id</span>s as attributes.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7efail))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7efail%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~fail</a></span></span><span class="hspace"> </span><span class="RktVar">maybe-fail-condition</span><span class="hspace"> </span><span class="RktVar">maybe-message-expr</span><span class="RktPn">)</span></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">maybe-fail-condition</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:when</span><span class="hspace"> </span><span class="RktVar">condition-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktPn">#:unless</span><span class="hspace"> </span><span class="RktVar">condition-expr</span></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td></tr><tr><td align="right" valign="baseline"><span class="RktVar">maybe-message-expr</span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td></td></tr></table></td></tr><tr><td align="right" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="center" valign="baseline">|</td><td align="left" valign="baseline"><span class="stt"> </span></td><td align="left" valign="baseline"><span class="RktVar">message-expr</span></td></tr></table></td></tr><tr><td><span class="stt"> </span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace"> </span></td><td><span class="RktVar">message-expr</span></td><td><span class="hspace"> </span></td><td>:</td><td><span class="hspace"> </span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">or/c</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=strings.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._string%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">string?</a></span><span class="hspace"> </span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote><p>If the condition is absent, or if the <span class="RktPn">#:when</span> condition
evaluates to a true value, or if the <span class="RktPn">#:unless</span> condition
evaluates to <span class="RktVal">#f</span>, then the pattern fails with the given
message. If the message is omitted, the default value <span class="RktVal">#f</span> is
used, representing “no message.”</p><p>Fail patterns can be used together with cut patterns to recognize
specific ill-formed terms and address them with custom failure
messages.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7eparse))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eparse%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~parse</a></span></span><span class="hspace"> </span><span class="RktVar">S-pattern</span><span class="hspace"> </span><span class="RktVar">stx-expr</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Evaluates <span class="RktVar">stx-expr</span> and matches it against
<span class="RktVar">S-pattern</span>. If <span class="RktVar">stx-expr</span> does not produce a syntax
object, the value is implicitly converted to a syntax object, unless
the conversion would produce <a href="stxparse-specifying.html#%28tech._3d._syntax%29" class="techoutside" data-pltdoc="x"><span class="techinside">3D syntax</span></a>, in which case an
exception is raised instead.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7eand._a)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eand%29%29" class="RktStxLink" data-pltdoc="x">~and</a></span><span class="hspace"> </span><span class="RktVar">A-pattern</span><span class="hspace"> </span><span class="RktMeta">...+</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Performs the actions of each <span class="RktVar">A-pattern</span>.</p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(form._((lib._syntax/parse..rkt)._~7edo))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edo%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">~do</a></span></span><span class="hspace"> </span><span class="RktVar">defn-or-expr</span><span class="hspace"> </span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Takes a sequence of definitions and expressions, which may be
intermixed, and evaluates them in the scope of all previous attribute
bindings. The names bound by the definitions are in scope in the
expressions of subsequent patterns and clauses.</p><p>There is currently no way to bind attributes using a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edo%29%29" class="RktStxLink" data-pltdoc="x">~do</a></span>
pattern. It is an error to shadow an attribute binding with a
definition in a <span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edo%29%29" class="RktStxLink" data-pltdoc="x">~do</a></span> block.</p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="Parsing_Syntax.html#%28form._%28%28lib._syntax%2Fparse..rkt%29._syntax-parse%29%29" class="RktStxLink" data-pltdoc="x">syntax-parse</a></span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktPn">(</span><span class="RktVal">1</span><span class="hspace"> </span><span class="RktVal">2</span><span class="hspace"> </span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">a</span><span class="hspace"> </span><span class="RktSym">b</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7edo%29%29" class="RktStxLink" data-pltdoc="x">~do</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Writing.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._printf%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">printf</a></span><span class="hspace"> </span><span class="RktVal">"a was ~s\n"</span><span class="hspace"> </span><span class="RktRdr">#'</span><span class="RktSym">a</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">c:id</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktVal">'</span><span class="RktVal">ok</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktOut">a was #<syntax:69:0 1></span></p></td></tr><tr><td><p><span class="RktErr">?: expected identifier</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">at: 3</span></p></td></tr><tr><td><p><span class="RktErr"></span><span class="hspace"> </span><span class="RktErr">in: (1 2 3)</span></p></td></tr></table></blockquote></div></p></blockquote><blockquote class="leftindent"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><span class="RktPn">(</span><a name="(elem._(pattern-link._(~7epost._a)))"></a><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7epost%29%29" class="RktStxLink" data-pltdoc="x">~post</a></span><span class="hspace"> </span><span class="RktVar">A-pattern</span><span class="RktPn">)</span></td></tr></table></blockquote><p>Like the single-term pattern version, <a href="#%28elem._%28pattern-link._%28~7epost._s%29%29%29" class="plainlink" data-pltdoc="x"><span class="RktKw">~post</span><span style="vertical-align: super; font-size: 80%">s</span></a>, but matches a head
pattern instead.</p></blockquote><h5 x-source-module="(lib "syntax/scribblings/syntax.scrbl")" x-source-pkg="racket-doc" x-part-tag=""Pattern_Expanders"">1.5.5<tt> </tt><a name="(part._.Pattern_.Expanders)"></a>Pattern Expanders</h5><p>The grammar of <a href="#%28tech._syntax._pattern%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax patterns</span></a> is extensible through the use of
<a name="(tech._pattern._expander)"></a><span style="font-style: italic">pattern expanders</span>, which allow the definition of new pattern
forms by rewriting them into existing pattern forms.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>As a convention to avoid ambiguity, <a href="#%28tech._pattern._expander%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern expander</span></a>
names normally begin with a <span class="RktSym">~</span><span class="RktMeta"></span> character.</p></blockquote></blockquote></blockquote><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._syntax/parse..rkt)._pattern-expander))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29" class="RktValDef RktValLink" data-pltdoc="x">pattern-expander</a></span></span><span class="hspace"> </span><span class="RktVar">proc</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander~3f%29%29" class="RktValLink" data-pltdoc="x">pattern-expander?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">proc</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="#%28tech._pattern._expander%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern expander</span></a> that uses <span class="RktVar">proc</span> to transform the pattern.</div></p><p><div class="SIntrapara">Example:</div><div class="SIntrapara"><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-syntax%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntax</a></span><span class="hspace"> </span><span class="RktSym">~maybe</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29" class="RktValLink" data-pltdoc="x">pattern-expander</a></span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._syntax-rules%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">syntax-rules</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">[</span><span class="RktPn">(</span><span class="RktSym">~maybe</span><span class="hspace"> </span><span class="RktSym">pat</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eoptional%29%29" class="RktStxLink" data-pltdoc="x">~optional</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eseq%29%29" class="RktStxLink" data-pltdoc="x">~seq</a></span><span class="hspace"> </span><span class="RktSym">pat</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stx-patterns.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fstxcase-scheme..rkt%2529._......%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">...</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></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._syntax/parse..rkt)._prop~3apattern-expander))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._prop~3apattern-expander%29%29" class="RktValDef RktValLink" data-pltdoc="x">prop:pattern-expander</a></span></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=Structure_Type_Property_Contracts.html%23%2528def._%2528%2528lib._racket%252Fcontract..rkt%2529._struct-type-property%252Fc%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">struct-type-property/c</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander~3f%29%29" class="RktValLink" data-pltdoc="x">pattern-expander?</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=function-contracts.html%23%2528form._%2528%2528lib._racket%252Fcontract%252Fbase..rkt%2529._-%7E3e%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x"><span class="nobreak">-></span></a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=structprops.html%23%2528tech._structure._type._property%2529&version=6.7" class="techoutside Sq" data-pltdoc="x"><span class="techinside">structure type property</span></a> to
identify structure types that act as <a href="#%28tech._pattern._expander%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern expanders</span></a> like the
ones created by <span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29" class="RktValLink" data-pltdoc="x">pattern-expander</a></span>.</div></p><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=begin.html%23%2528form._%2528%2528quote._%7E23%7E25kernel%2529._begin-for-syntax%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">begin-for-syntax</a></span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct</a></span><span class="hspace"> </span><span class="RktSym">thing</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">proc</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander%29%29" class="RktValLink" data-pltdoc="x">pattern-expander</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:property</span><span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=procedures.html%23%2528def._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._prop%7E3aprocedure%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">prop:procedure</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define-struct.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._struct-field-index%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">struct-field-index</a></span><span class="hspace"> </span><span class="RktSym">proc</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">#:property</span><span class="hspace"> </span><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._prop~3apattern-expander%29%29" class="RktValLink" data-pltdoc="x">prop:pattern-expander</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._%7Ece%7Ebb%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">λ</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">this</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">thing-pattern-expander</span><span class="hspace"> </span><span class="RktSym">this</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=define.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._define-syntax%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">define-syntax</a></span><span class="hspace"> </span><span class="RktSym">~maybe</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">thing</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">....</span><span class="hspace"> </span>macro behavior<span class="hspace"> </span><span class="RktSym">....</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=lambda.html%23%2528form._%2528%2528lib._racket%252Fprivate%252Fbase..rkt%2529._lambda%2529%2529&version=6.7" class="RktStxLink Sq" data-pltdoc="x">lambda</a></span><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym">stx</span><span class="RktPn">)</span><span class="hspace"> </span><span class="RktSym">....</span><span class="hspace"> </span>pattern-expander behavior<span class="hspace"> </span><span class="RktSym">....</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote><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._syntax/parse..rkt)._pattern-expander~3f))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._pattern-expander~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">pattern-expander?</a></span></span><span class="hspace"> </span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=booleans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._boolean%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">v</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/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.7" class="RktValLink Sq" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <a href="#%28tech._pattern._expander%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern expander</span></a>,
<span class="RktVal">#f</span> otherwise.</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._syntax/parse..rkt)._syntax-local-syntax-parse-pattern-introduce))"></a><span title="Provided from: syntax/parse | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._syntax%2Fparse..rkt%29._syntax-local-syntax-parse-pattern-introduce%29%29" class="RktValDef RktValLink" data-pltdoc="x">syntax-local-syntax-parse-pattern-introduce</a></span></span><span class="hspace"> </span><span class="RktVar">stx</span><span class="RktPn">)</span><span class="hspace"> </span>→<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span></p></blockquote></td></tr><tr><td><span class="hspace"> </span><span class="RktVar">stx</span><span class="hspace"> </span>:<span class="hspace"> </span><span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxops.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax%7E3f%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=reference&rel=stxtrans.html%23%2528def._%2528%2528quote._%7E23%7E25kernel%2529._syntax-local-introduce%2529%2529&version=6.7" class="RktValLink Sq" data-pltdoc="x">syntax-local-introduce</a></span>, but for <a href="#%28tech._pattern._expander%29" class="techoutside" data-pltdoc="x"><span class="techinside">pattern expanders</span></a>.</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.7", "../");" 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.7");">top</a></span><span class="navright"> <a href="stxparse-specifying.html" title="backward to "1.4 Specifying Syntax with Syntax Classes"" data-pltdoc="x">← prev</a> <a href="stxparse.html" title="up to "1 Parsing and Specifying Syntax"" data-pltdoc="x">up</a> <a href="Defining_Simple_Macros.html" title="forward to "1.6 Defining Simple Macros"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|