From: Jeremy Tregunna Date: 2006-10-06T02:29:56+09:00 Subject: Re: [OT] Re: dynamically changing superclass/mixins On 06-10-05, at 12:17, ara.t.howard@noaa.gov wrote: > On Fri, 6 Oct 2006, Jeremy Tregunna wrote: > > one last comment, and then i'll move over to the io list, since > this is really > ot (sorry everyone)... > >> Sure. It's really simple actually. Every bit of Io code you see >> (excluding >> comments) are messages. Io is a message based language, there are no >> keywords, and infact, the only reason comments aren't messages is >> because I >> havn't completed my patch to Io's parser and lexer to transform >> #, // and /* >> */ into an actual message yet. >> >> Considering the parse tree for the above can be a little more >> verbose than it needs to to demonstrate how Io is parsed, I'll >> draw out the parse tree as a list of lists (try not to think of it >> as a tree because it's not really). The code example is: >> >> method(a, a * a) call(5); otherStuff >> >> The above is transformed into several messages >> >> --- method --- call >> | a 5 >> | a - * >> | a >> |- otherStuff >> >> >> (Apologies if your mail client made that look funny.) > > would the above be read something like > > m = method a, a * a > > m 5 > > otherStuff It could be yes. Though the only reason I didn't assign the method to a slot (variable) beforehand was because assignment in Io is different. The parser translates a := b into setSlot("a", b) so I didn't want to confuse any more than was bound to happen by introducing this oddity. > is the parse non-ambiguous as > > (method a, a * a) call 5 ; otherStuff I'm not exactly sure what you're after here. The snippit of code in question isn't ambiguous. -- Jeremy Tregunna jtregunna@blurgle.ca