<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 4 May 2016, at 15:07, L. Mihalkovic &lt;<a href="mailto:laurent.mihalkovic@gmail.com" class="">laurent.mihalkovic@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Cool job!.. Yup, you proceed by "<i class="">widening the existing holes</i>" to carry the missing info (eg Modifiers). Making direct changes to lexCharacter() is a step I thought might be a bit premature considering nothing is carved in stone yet. I was trying to advocate for a clean boundary between current behavior and new ones, such that we, as well as others, would be able to try alternative syntaxes by changing the content of clearly identified methods (as opposed to starting their own integration from scratch each time, or having to un-unstitch parts of multiple already not so simple methods). I guess I am also extra cautious in my own coding because this a lexer, and the more paths through something like lexCharacter() or getEncodedStringSegment(), the more difficult it might be to prove that all of them have been identified and exercised. Thx for inspiring my experimentations.</div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Thanks (I think!). I’m not trying to disenfranchise other developers by trying to squeeze all functionality into the existing functions.</div><div class="">It’s the nature of the problem. Multiline strings, alternative delimiter _””_ and non processing of escapes (\’s) are orthogonal;</div><div class="">they can in theory be applied separately and together. Wouldn’t that require 8 separate implementations dependent on</div><div class="">the combination? Far easier to just use modality. The code is getting unruly but not beyond the pale yet.</div><div class=""><br class=""></div><div class="">It’s just a prototype anyway intended to help with specification and testing. Better take a step back.</div><div class=""><br class=""></div><div class="">Did we get near to acquiescence to any of the following as a prospective proposal (as I understand it)?</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>1)&nbsp;Any string literal that is it not closed becomes a multiline literal if the first non-whitespace character on the next line is “</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #bb2ca2" class="">let</span><span style="font-variant-ligatures: no-common-ligatures" class=""> xml = </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"\</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;?xml version=\"1.0\"?&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;catalog&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &lt;book id=\"bk101\" empty=\"\"&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;author&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">author</span><span style="font-variant-ligatures: no-common-ligatures" class="">)&lt;/author&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;title&gt;XML Developer's Guide&lt;/title&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;genre&gt;Computer&lt;/genre&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;price&gt;44.95&lt;/price&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;description&gt;An in-depth look at creating \</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "applications with XML.&lt;/description&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &lt;/book&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;/catalog&gt;\n"</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; </span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">print</span><span style="font-variant-ligatures: no-common-ligatures" class="">(xml)</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class="">While this is not ideal in terms of having to massage data templates as you paste them in, it is the price of code that looks</div><div class="">easy on the eye. (In practice pasting into Xcode it will reformat your string anyway so editing will normally be required.)</div><div class="">What will other editors make of this novel format?</div><div class=""><br class=""></div><div class="">Optionally, for a separate proposal perhaps:</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>2) As a convenience, if a literal starts with _” it must be terminated by “_ to avoid having to escape embedded “s.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">assert</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">( xml == _</span><span style="font-variant-ligatures: no-common-ligatures" class="">"&lt;?xml version="1.0"?&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;catalog&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &lt;book id="bk101" empty=""&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;author&gt;</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">\</span><span style="font-variant-ligatures: no-common-ligatures" class="">(</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">author</span><span style="font-variant-ligatures: no-common-ligatures" class="">)&lt;/author&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;title&gt;XML Developer's Guide&lt;/title&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;genre&gt;Computer&lt;/genre&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;price&gt;44.95&lt;/price&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;publish_date&gt;2000-10-01&lt;/publish_date&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &nbsp; &nbsp; &lt;description&gt;An in-depth look at creating applications with XML.&lt;/description&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; " &nbsp; &lt;/book&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "&lt;/catalog&gt;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ""</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">_ )</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""><br class=""></span></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>3)&nbsp;Opening the floodgates to an alphabet of the literal modifiers, if the string starts e”a string” then all escape sequences</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>including interpolation but not including&nbsp;\” and \&lt;newline&gt; are not processed but passed through into the literal intact.</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(209, 47, 27);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">assert</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">( e</span><span style="font-variant-ligatures: no-common-ligatures" class="">"\w\d+\(author)\n"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> == </span><span style="font-variant-ligatures: no-common-ligatures" class="">"<a href="smb://w//d+//(author)//n" class="">\\w\\d+\\(author)\\n</a>"</span><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class=""> );</span></div></div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>These modifiers are smuggled through the parsing process to code generation by storing them against the Token.</div><div class=""><br class=""></div><div class="">Very Optionally, and largely as an historical accident</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>4)&nbsp;an r”regex” string will pass through non-standard escapes but still process&nbsp;\0, \r, \n, \”, \’, \\, \u{NNNN} and \(</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo;" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span><span style="font-variant-ligatures: no-common-ligatures; color: #3d1d81" class="">assert</span><span style="font-variant-ligatures: no-common-ligatures" class="">( r</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"\w\d+</span><span style="font-variant-ligatures: no-common-ligatures" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span><span style="font-variant-ligatures: no-common-ligatures" class="">author</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)\n"</span><span style="font-variant-ligatures: no-common-ligatures" class=""> == </span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">"<a href="smb://w//d+" class="">\\w\\d+</a></span><span style="font-variant-ligatures: no-common-ligatures" class="">\</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">(</span><span style="font-variant-ligatures: no-common-ligatures" class="">author</span><span style="font-variant-ligatures: no-common-ligatures; color: #d12f1b" class="">)\n"</span><span style="font-variant-ligatures: no-common-ligatures" class=""> ); </span><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class="">// handy if you ask me</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px;" class="">Brent, what is the state of the proposal document you prepared?</div><div class=""><br class=""></div></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures; color: #008400" class=""><br class=""></span></div></div></div></body></html>