<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">The full definition from the draft standards (don’t have the standard handy) is:<div><br></div><div><div><block constructor> ::= '[' <block body> ']'</div><div><block body> ::= [<block argument>* '|'] [<temporaries>] [<statements>]</div><div><block argument> ::= ':' identifier</div><div><br></div><div>The last line is on the next page of the draft.</div><br><div id="AppleMailSignature" dir="ltr"><span style="font-size: 13pt;">/————————————————————/</span><div><span style="font-size: 13pt;">For encrypted mail use <a href="mailto:jgpfersich@protonmail.com">jgpfersich@protonmail.com</a></span><div>Get a free account at <a href="http://ProtonMail.com">ProtonMail.com</a></div><div>Web: <a href="http://www.objectnets.net">www.objectnets.net</a> and <a href="http://www.objectnets.org">www.objectnets.org</a></div></div></div><div dir="ltr"><br>On Aug 18, 2019, at 12:09, JOHN SARKELA via Squeak-dev <<a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev@lists.squeakfoundation.org</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">The ANSI standard has the following rules for blocks:<div class="">
<div class="page" title="Page 21">
<div class="layoutArea">
<div class="column"><p class=""><span style="font-size: 10.000000pt; font-family: 'ArialMT'" class=""><block constructor> ::= '[' <block body> ']'<br class="">
<block body> ::= [<block argument>* '|'] [<temporaries>] [<statements>]
</span></p>
</div>
</div>
The standard does not recognize [:x] as legal syntax for a block.<page21image64736448.png>
<page21image37471328.png>
<page21image64735680.png>
<page21image64733952.png>
<page21image64746816.png>
</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Aug 18, 2019, at 3:03 PM, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" class="">leves@caesar.elte.hu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Hi Nicolas,</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Thanks for investigating this.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I still think that it's just a parser bug, which is accidentally "used" sometimes, especially because it only works when the block is empty.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Or does it work in other dialects with non-empty blocks?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Is it used in other dialects?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Levente</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On Sun, 18 Aug 2019, Nicolas Cellier wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" 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-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Le jeu. 15 août 2019 à 12:21, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" class="">leves@caesar.elte.hu</a>> a écrit :<br class=""> On Thu, 15 Aug 2019, Tobias Pape wrote:<br class=""><br class=""> ><br class=""> >> On 15.08.2019, at 03:29, Levente Uzonyi <<a href="mailto:leves@caesar.elte.hu" class="">leves@caesar.elte.hu</a>> wrote:<br class=""> >><br class=""> >> On Wed, 14 Aug 2019, <a href="mailto:commits@source.squeak.org" class="">commits@source.squeak.org</a> wrote:<br class=""> >><br class=""> >>> A new version of ShoutCore was added to project The Inbox:<br class=""> >>> <a href="http://source.squeak.org/inbox/ShoutCore-ct.69.mcz" class="">http://source.squeak.org/inbox/ShoutCore-ct.69.mcz</a><br class=""> >>><br class=""> >>> ==================== Summary ====================<br class=""> >>><br class=""> >>> Name: ShoutCore-ct.69<br class=""> >>> Author: ct<br class=""> >>> Time: 14 August 2019, 10:43:04.7164 pm<br class=""> >>> UUID: 7d165f4e-09bf-a445-a664-5e8edb9867b8<br class=""> >>> Ancestors: ShoutCore-ul.68<br class=""> >>><br class=""> >>> Fix bug in SHParserST80: Wrong styling after blocks with arguments without statements<br class=""> >><br class=""> >> If you mean that Shout should accept [ :x ], then no, I'm pretty sure that's not valid smalltalk syntax, even if Parser accepts it.<br class=""> >> The vertical bar, even though I consider it unnecessary in all cases, is mandatory when there are arguments.<br class=""> ><br class=""> > I only got to know this "shortcut syntax" because eliot used it either Cog or somewhere in trunk when preparing something (Spur? full block closures? I forgot). So this is a syntax idiosyncrasy that is in active use, not only "old code".<br class=""> ><br class=""> > Either we forbid it in the parser and change all of the image or allow it in Shout.<br class=""><br class=""> Can you give me examples?<br class=""> I suspect those are just typos, which the parser accidentally accepted<br class=""> (and Shout as well before my fixes).<br class=""><br class=""> Levente<br class="">I don't remember seeing this syntax before and found it a bit surprising.<br class="">So, for the sake of curiosity, I tried in some other dialects.<br class="">[:x ] is accepted syntax in<br class="">- Visualworks (8.3),<br class="">- Pharo (v7 with OpalCompiler)<br class="">- Smalltalk-80 (apple v0.?)<br class="">[:x ] is invalid in<br class="">- Dolphin<br class="">- Smalltalk/X (jv branch)<br class="">So it seems that it's something originating from original Smalltalk-80, but not reproducted in non derivated dialects...<br class="">The bar is mandatory in blue book specification (see the last pages)<br class="">Capture d’écran 2019-08-18 à 17.11.53.png<br class="">So it seems that implementation did not agree with specifications for ages...<br class="">Capture d’écran 2019-08-18 à 18.56.05.png<br class=""><br class=""> ><br class=""> > Best regards<br class=""> > -Tobias<br class=""> ><br class=""> >><br class=""> >> Levente<br class=""> >><br class=""> >>><br class=""> >>> Thanks Jakob for the report!<br class=""> >>><br class=""> >>> =============== Diff against ShoutCore-ul.68 ===============<br class=""> >>><br class=""> >>> Item was changed:<br class=""> >>> ----- Method: SHParserST80>>parseBlockArguments (in category 'parse') -----<br class=""> >>> parseBlockArguments<br class=""> >>><br class=""> >>> currentTokenFirst == $: ifFalse: [ ^self ].<br class=""> >>> [ currentTokenFirst == $: ] whileTrue: [<br class=""> >>> self<br class=""> >>> scanPast: #blockArgColon;<br class=""> >>> parseArgument: #blockPatternArg ].<br class=""> >>> + ((self parseVerticalBarForTemporaries: #blockArgsBar) and: [<br class=""> >>> + currentTokenFirst ~= $] ])<br class=""> >>> + ifFalse: [<br class=""> >>> + self fail ": Missing block args bar" ]!<br class=""> >>> - (self parseVerticalBarForTemporaries: #blockArgsBar) ifFalse: [<br class=""> >>> - self fail ": Missing block args bar" ]!<br class=""> >></blockquote></div></blockquote></div><br class=""></div></div></div></div></blockquote><blockquote type="cite"><div dir="ltr"><span></span><br></div></blockquote></div></body></html>