Re: Questions on In Scope for INFORM


04 Apr 1995 21:28:22 GMT

Greg Ewing <greg@cosc.canterbury.ac.nz> wrote:
> I hate to think what this implies about how Inform's source parser
> works...

The Inform compiler was written by someone for whom the terms `lexical
analysis', `LR(1) parser', `context-free language' and `recursive
descent' are just distant whisperings in the ivory towers of computer
science. As such, it is a work of art!

Incidentally, the curious design of the Inform parser makes it possible
for it to run on machines with small memories. Whereas a more
superficially sophisticated tool like GCC tries to keep the entire
syntax tree in memory (so that it can do basic-block analysis, dataflow
analysis, common subexpression elimination and so on), Inform attempts
to parse the source a line at a time. While this may cause it sometimes
to run into problems with complicated expressions, it usually does the
right thing!

--
Gareth Rees