<div dir="ltr"><div class="gmail_quote">On Fri, Oct 7, 2016 at 6:50 AM, Jason A. Donenfeld <span dir="ltr"><<a href="mailto:Jason@zx2c4.com" target="_blank">Jason@zx2c4.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><span><p dir="ltr"></p>
<p dir="ltr">On Oct 5, 2016 8:01 AM, "Trevor Perrin" <<a href="mailto:trevp@trevp.net" target="_blank">trevp@trevp.net</a>> wrote:<br>
> Maybe, but if the only benefit here is that a tool that works with<br>
> text patterns can avoid scanning for "...", that's not that much of a<br>
> gain.</p>
</span><p dir="ltr">Scanning for ... isn't even required; it's easier than that. You load the results into a temporary. If you hit a ..., everything prior is premessage and everything after is ordinary. If you never hit a ..., everything is ordinary. So this remains quite trivial to implement even when streaming byte by byte, without having to even scan out.</p>
<p dir="ltr">In otherbwords, I agree with you.</p>
</blockquote></div><div class="gmail_extra">OK, OK, I'll concede the point. :-)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Modified ABNF attached.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Cheers,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Rhys.</div><div class="gmail_extra"><br></div><div class="gmail_extra">; Defined using the ABNF syntax from RFC 5234. The character set is US-ASCII.<br>;<br>; The "pattern-file" element is intended for a pattern dictionary file that<br>; contains multiple pattern definitions.<br>;<br>; The "pattern-single" element is intended for applications that wish to<br>; provide an API to define the specific pattern to use in a handshake.</div><div class="gmail_extra">; Syntactic elements</div><div class="gmail_extra">pattern-file = *(wsp pattern) wsp</div><div class="gmail_extra">pattern-single = wsp pattern wsp</div><div class="gmail_extra">pattern = header wsp [pre-message wsp "..." wsp] messages</div><div class="gmail_extra">header = name wsp "(" wsp params wsp ")" wsp ":"</div><div class="gmail_extra">params = param *(wsp "," wsp param)</div><div class="gmail_extra">param = "e" / "s" / "re" / "rs"</div><div class="gmail_extra">pre-message = message-init [wsp message-resp] / message-resp</div><div class="gmail_extra">messages = *(message-pair wsp) message-init / message-pair</div><div class="gmail_extra">message-pair = message-init wsp message-resp</div><div class="gmail_extra">message-init = "->" wsp message-tokens</div><div class="gmail_extra">message-resp = "<-" wsp message-tokens</div><div class="gmail_extra">message-tokens = message-token *(wsp "," wsp message-token)</div><div class="gmail_extra">message-token = "e" / "s" / "ee" / "ss" / "se" / "es"</div><div class="gmail_extra">; Lexical tokens</div><div class="gmail_extra">name = "Noise_" name-component *("+" name-component)</div><div class="gmail_extra">name-component = 1*(ALPHA / DIGIT)</div><div class="gmail_extra">wsp = *(WSP / eol / comment)</div><div class="gmail_extra">comment = "//" *(VCHAR / WSP) eol</div><div class="gmail_extra">eol = CRLF / LF</div><div class="gmail_extra">; Imported from core ABNF (RFC 5234): VCHAR, WSP, CRLF, LF, ALPHA, DIGIT<br></div><div class="gmail_extra"><br></div></div>