<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature"><div dir="ltr"><div><br></div></div></div></div><div class="gmail_quote">On Wed, Oct 19, 2016 at 10:12 AM, Alex Martini <span dir="ltr"><<a href="mailto:amartini@apple.com" target="_blank">amartini@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><span class="gmail-"><blockquote type="cite"><div dir="ltr"><div class="gmail-m_7603395970343509246gmail_signature"><div dir="ltr"><h4 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:16px;line-height:1.25;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol"">Grammar changes<br></h4><pre style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;margin-top:0px;margin-bottom:16px;font-stretch:normal;line-height:1.45;word-wrap:normal;padding:16px;overflow:auto;background-color:rgb(247,247,247);border-radius:3px;color:rgb(51,51,51)"><code style="box-sizing:border-box;font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:13.6px;padding:0px;margin:0px;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;background-color:transparent;border-radius:3px;word-break:normal;border:0px;display:inline;overflow:visible;line-height:inherit;word-wrap:normal">operator → operator-head operator-characters[opt]
operator-head → ! % & * + - / < = > ? ^ | ~
operator-head → operator-dot operator-dots
operator-character → operator-head
operator-characters → operator-character operator-character[opt]
operator-dot → .
operator-dots → operator-dot operator-dots[opt]
</code></pre><h3 style="box-sizing:border-box;margin-top:24px;margin-bottom:16px;font-size:1.25em;line-height:1.25;color:rgb(51,51,51);font-family:-apple-system,blinkmacsystemfont,"segoe ui",helvetica,arial,sans-serif,"apple color emoji","segoe ui emoji","segoe ui symbol""><a id="gmail-m_7603395970343509246gmail-user-content-emoji" href="https://github.com/jtbandes/swift-evolution/blob/unicode-id-op/proposals/NNNN-refining-identifier-and-operator-symbology.md#emoji" style="box-sizing:border-box;background-color:transparent;color:rgb(64,120,192);text-decoration:none;float:left;padding-right:4px;line-height:1" class="gmail-m_7603395970343509246gmail-anchor" target="_blank"></a></h3></div></div></div></blockquote></span><br>I think there's a mismatch between the English and grammar. For example, is +..+ allowed or not?<div><br></div><div>The English rule does allow +..+ because its dots appear in a run of two.</div><div><br></div><div>The grammar allows a run of one or more dots as an operator head, but never allows dots as characters appearing in the middle of an operator, regardless of how many dots appear next to each other. The grammar wouldn't allow +..+ because the dots don't come at the beginning.</div><div><br></div><div><br></div><div><br></div><div>Here's an alternate version of the grammar that matches the "two or more" rule. Because we no longer distinguish between which characters are allowed as the first character of an operator vs a character inside, there's no longer a need for a separate operator-head.</div><div><br></div><div><font color="#333333" face="Menlo"><span style="font-size:14px">operator --> operator-character </span></font><span style="color:rgb(51,51,51);font-family:menlo;font-size:14px">operator</span><span style="font-size:14px;color:rgb(51,51,51);font-family:menlo">-<wbr>OPT</span></div><div><font color="#333333" face="Menlo"><span style="font-size:14px"><br></span></font></div><div><font color="#333333" face="Menlo"><span style="font-size:14px">operator-character --> ! % & * + - / < = > ? ^ | ~</span></font></div><div><font color="#333333" face="Menlo"><span style="font-size:14px">operator-</span></font><span style="color:rgb(51,51,51);font-family:menlo;font-size:14px">character</span><font color="#333333" face="Menlo"><span style="font-size:14px"> --> operator-dots</span></font></div><div><font color="#333333" face="Menlo"><span style="font-size:14px"><br></span></font></div><div><font color="#333333" face="Menlo"><span style="font-size:14px">operator-dots --> .. operator-additional-dots-OPT</span></font></div><div><span style="color:rgb(51,51,51);font-family:menlo;font-size:14px">operator-additional-dots --> . </span><span style="color:rgb(51,51,51);font-family:menlo;font-size:14px">operator-additional-dots-OPT</span></div></div></blockquote><div><br></div><div>There is a typo in that operator-character[opt] should be operator-characters[opt]. Aside from that, though, I believe the grammar as written accepts +..+ already. Take a look at the following series of substitutions based on the grammar rules:</div><div><br></div><div>operator</div><div>operator-head operator-characters</div><div>+ operator-characters</div><div>+ operator-character operator-characters[opt]</div>+ operator-head operator-head<div>+ operator-dot operator-dots operator-head</div><div>+ . . +</div></div><br></div></div>