[squeak-dev] Re: question on Parser>>pattern:inContext: and method:context:encoder:

Eliot Miranda eliot.miranda at gmail.com
Thu Jun 26 05:26:11 UTC 2008


No worries.  We worked it out.  Sorry for the noise.

On Wed, Jun 25, 2008 at 6:08 PM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

> I should say that this is in a 3.8 Croquet (actually Qwaq) image.
>
>
> On Wed, Jun 25, 2008 at 5:54 PM, Eliot Miranda <eliot.miranda at gmail.com>
> wrote:
>
>> Hi All,
>>
>>
>> I noticed when merging the base and Tweak compilers that Andreas wrote
>> different versions of Parser>>method:context:encoder: and
>> Parser>>pattern:inContext: for the Tweak compiler (in CParser) that "do the
>> right thing".  His versions in CParser bind the arguments in
>> pattern:inContext: as each arg name is encountered.  The versions in Parser
>> bind the arguments in Parser>>method:context:encoder: all in one go *after*
>> pattern:inContext: has parsed all arguments.  This means that if there is an
>> error (e.g. use the same arg name twice) the Parser methods insert the error
>> at the wrong point since prevMark is now always pointing to the last
>> argument not necessarily to the argument that is repeated.
>>
>>
>> yes, you guessed it I just repeated an argument name and was confused as
>> hell for a while since the damn compiler pointed to the error at the wrong
>> place.
>>
>>
>> So I clearly want to replace the methods in Parser with Andreas' mo' betta
>> ones in CParser.  The annoying question is why did anyone change the
>> original Parser methods to do the wrong thing in the first place?  Until I
>> know that I have a nagging doubt that I'm missing something.
>>
>>
>> I've gone through the update history up to version 3.6 and don't see the
>> new behaviour in Parser in any update there-in.  Anyone know why this
>> changed or can point me to where to look next?
>>
>>
>> AdvThanksance
>>
>>
>> Eliot
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080625/42aae523/attachment.htm


More information about the Squeak-dev mailing list