[OT] Writing a parser for BASIC in Smalltalk/Squeak ? (<CSOTD
> included)
Withers, Robert
rwithers at quallaby.com
Thu Jan 10 01:40:19 UTC 2002
Tim, I don't agree. Don't rely on books so much {raspberry sound effects}
;-) Consider that in:
| m n |
n := 2.
m := 3.
n := m + (m := n).
m is the receiver of the plus message and not another argument, as in your
example, so it gets pushed onto the stack before the arguments are
evaluated, inline. My C++ example was really wrong, and let's just forget
about that, please.
check out these bytecodes:
<77> pushConstant: 2
<69> popIntoTemp: 1
<20> pushConstant: 3
<68> popIntoTemp: 0
<10> pushTemp: 0
<11> pushTemp: 1
<81 40> storeIntoTemp: 0
<B0> send: +
<81 41> storeIntoTemp: 1
<7C> returnTop
rob
> -----Original Message-----
> From: Tim Rowledge [mailto:tim at sumeru.stanford.edu]
> Sent: Wednesday, January 09, 2002 7:22 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: Re: [OT] Writing a parser for BASIC in Smalltalk/Squeak ?
> (<CSOTD> included)
>
>
> Sorry guys, but by inspection, deduction, induction, reductio ad
> absurdum, bivariant algorithmic analysis, flim-flam and fiat, you are
> wrong. So there. {raspberry sound effects}
>
> Expressions in () are supposed to be _completed_ before the
> rest of the
> expression is executed.
>
> foo doThisWith: a and: (a _ fribble slander)
> should be identical to
> a_ fribble slander.
> foo doThisWith: a and: a
>
> Suggesting anything else is a symptom of advanced senility. It says so
> in this book right here.
>
> tim
>
> --
> Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
> Useful random insult:- Couldn't balance a checkbook if
> Einstein helped.
>
>
>
More information about the Squeak-dev
mailing list
|