[squeak-dev] question on Parser>>pattern:inContext: and
stephane.ducasse at free.fr
Fri Jun 27 06:42:41 UTC 2008
if you change the old compiler could publish the changes somewhere.
For the new compiler we want to have an interface with a context
object instead of passing 5 or 6 rguments
all the time.
On Jun 26, 2008, at 2:54 AM, Eliot Miranda 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?
More information about the Squeak-dev