Assignment Versus Equality

BartC bc at freeuk.com
Tue Jun 28 06:35:15 EDT 2016


On 28/06/2016 01:11, Dennis Lee Bieber wrote:
> On Tue, 28 Jun 2016 00:08:00 +0100, BartC <bc at freeuk.com> declaimed the
> following:
>
>>
>> You just design the compiler to do the same processing in each case, ie.
>> parse a <name> followed (<expression>), then mark the result AST
>> fragment as either an Array term, or Format statement, depending on what
>> follows, and whether the name is "format".
>>
> 	You're expecting an AST in a compiler from the 50s?
>

Well, FORTRAN in the 50s would have been much simpler too. No nested 
subscripts for example. And ASTs are just one of many methods of compiling.

> 	That might have involved having to punch an output deck of cards for
> each compile, only to then feed that deck back into the reader for the next
> phase of compilation.

We have to assume that at least one complete line could be held in 
memory. Then you can reinterpret it as many times as you like. (I don't 
know if 1950s FORTRAN has continuation lines, which makes that a little 
harder.)

However, not allowing FORMAT as a variable name probably /would/ have 
been simpler!

-- 
Bartc



More information about the Python-list mailing list