conditional expressions (RE: Loop-and-a-half (Re: Curious assignment behaviour))
johnroth at ameritech.net
Mon Oct 15 20:27:54 CEST 2001
"Ian Parker" <parker at gol.com> wrote in message
news:apXvDKAPApy7EwVg at gol.com...
> In article <7xitdha8tg.fsf at ruckus.brouhaha.com>, Paul Rubin <phr-
> n2001d at nightsong.com> writes
> >"Tim Peters" <tim.one at home.com> writes:
> >> > x = if e1 then (e2) else (e3)
> >> > and
> >> > x = (if e1 then (e2) else (e3))
> >> > should be equivalent and they preserve clarity.
> >> The latter form would be accepted, but not the former (and the former
> >> be accepted, which is a question of parser technology, not of taste).
> >How did Algol 60 deal with this?
> to excess, and with a more complicated parser, I imagine:
Actually, there was a quite good book on one company's Algol 60
implementation (called "Algol 60 Implementation", I believe), that
showed a recursive descent parser, with all of the parser and interpreter
functions diagrammed out. This was before there was a whole lot
of parser theory to go by...
More information about the Python-list