On 28/06/2016 01:11, Dennis Lee Bieber wrote:
On Tue, 28 Jun 2016 00:08:00 +0100, BartC <b...@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
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to