<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 May 6, 2016, at 7:13 PM, L Mihalkovic <<a href="mailto:laurent.mihalkovic@gmail.com" class="">laurent.mihalkovic@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">As I (<i class="">believe I</i>) start to understand the parser, I somehow think that doing something like the following would </div><div class=""><ul class="MailOutline"><li class="">not violate (<i class="">not take too much risk</i>) the current Lexer/Parser</li><li class="">be somewhat reasonable to implement</li><li class="">address many of the reqs I read </li><li class="">leave some infrastructure in the Lexer/Parser to add more feature without needing to go back to square 0 next time</li></ul><div class=""><br class=""></div></div><div class="">Any thoughts?!</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><font face="Monaco" class="">#!/usr/bin/env xcrun swift</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><span style="font-family: Monaco;" class="">let s1 = "{\"key1\": \"stringValue\"}"</span></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><font face="Monaco" class="">let s2 = _"{"key1": "stringValue"}"_</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><font face="Monaco" class="">let s3 =</font></div><div class=""><font face="Monaco" class=""> /* this is the same template */</font></div><div class=""><font face="Monaco" class=""> _"{"key1": "stringValue"}"_</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><font face="Monaco" class="">let s4 =</font></div><div class=""><font face="Monaco" class="">/* this is (almost) the same template */</font></div><div class=""><font face="Monaco" class="">_"</font></div><div class=""><font face="Monaco" class="">{</font></div><div class=""><font face="Monaco" class=""> "key1": "stringValue"</font></div><div class=""><font face="Monaco" class=""> , "key2": "stringValue"</font></div><div class=""><font face="Monaco" class="">}</font></div><div class=""><font face="Monaco" class="">"_</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><font face="Monaco" class="">let s5 = @literal(json)</font></div><div class=""><font face="Monaco" class=""> /* this is exactly the same template as s4 */</font></div><div class=""><font face="Monaco" class=""> _"</font></div><div class=""><font face="Monaco" class=""> {</font></div><div class=""><font face="Monaco" class=""> "key1": "stringValue"</font></div><div class=""><font face="Monaco" class=""> , "key2": "stringValue"</font></div><div class=""><font face="Monaco" class=""> }</font></div><div class=""><font face="Monaco" class=""> "_</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div></div></div></blockquote><div><br class=""></div><div>sorry for the mistake, but I think the more appropriate way to say that should have been</div><div><br class=""></div><div><span style="font-family: Monaco;" class="">let s5:</span><span style="font-family: Monaco;" class=""> </span><span style="font-family: Monaco;" class="">@literal(json)</span><span style="font-family: Monaco;" class=""> String</span><span style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: italic; background-color: rgb(255, 255, 255);" class=""> </span><span style="font-family: Monaco;" class="">= </span></div><div><span style="font-family: Monaco;" class=""> /* this is exactly the same template as s4 */</span><br class=""><span style="font-family: Monaco;" class=""> _"</span><br class=""><span style="font-family: Monaco;" class=""> {</span><br class=""><span style="font-family: Monaco;" class=""> "key1": "stringValue"</span><br class=""><span style="font-family: Monaco;" class=""> , "key2": "stringValue"</span><br class=""><span style="font-family: Monaco;" class=""> }</span><br class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><font face="Monaco" class=""> "_</font></div></div><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><font face="Monaco" class=""><br class=""></font></div></div></div></div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><font face="Monaco" class="">let s6 = @literal(json)</font></div><div class=""><font face="Monaco" class=""> /* this is exactly the same template as s5&s4 */</font></div><div class=""><font face="Monaco" class=""> _"</font></div><div class=""><font face="Monaco" class=""> |{</font></div><div class=""><font face="Monaco" class=""> | "key1": "stringValue"</font></div><div class=""><font face="Monaco" class=""> | , "key2": "stringValue"</font></div><div class=""><font face="Monaco" class=""> |}</font></div><div class=""><font face="Monaco" class=""> "_</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div></div></div></blockquote></div><br class=""><div class="">same for s6 which should read</div><div class=""><div><span style="font-family: Monaco;" class=""><br class=""></span></div><div><span style="font-family: Monaco;" class="">let s6:</span><span style="font-family: Monaco;" class=""> </span><span style="font-family: Monaco;" class="">@literal(json)</span><span style="font-family: Monaco;" class=""> String</span><span style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: italic; background-color: rgb(255, 255, 255);" class=""> </span><span style="font-family: Monaco;" class="">= ...</span></div></div><div class=""><br class=""></div><div class=""><div class="">I have not checked it the following would be enough</div><div class=""><br class=""></div><div class=""><div class=""><div><span style="font-family: Monaco;" class="">let s6:</span><span style="font-family: Monaco;" class=""> </span><span style="font-family: Monaco;" class="">@literal(json) </span><span style="font-family: Helvetica, Arial, sans-serif; font-size: 14px; font-style: italic; background-color: rgb(255, 255, 255);" class=""> </span><span style="font-family: Monaco;" class="">= ...</span></div></div></div><div class=""><span style="font-family: Monaco;" class=""><br class=""></span></div><div class=""></div></div></body></html>