Newsgroups: | comp.compilers |
From: | Stefan Monnier <monnier@di.epfl.ch> |
Keywords: | syntax, design |
Organization: | Ecole Polytechnique Federale de Lausanne |
References: | 95-04-013> 95-05-069 |
Date: | Thu, 11 May 1995 11:37:38 GMT |
mitchell@mdd.comm.mot.com (Bill Mitchell) writes:
... Inferring flow control from indent level just does not work in
practice in a multi-programmer, multi-editor multi-display-format
situation.
Stephen J Bevan <bevan@cs.man.ac.uk> wrote:
] Wouldn't the problem be solved if all the programmers on the project
] followed (and stuck to!) a style guide? I know it can grate to have
] to use a style which does not match your own, but IMHO the advantages
] outweigh the disadvantages on a multi-person project. Since this is
Wouldn't it be so much easier to store your source as a syntax-tree ?
1 - the compiler doesn't have to care about parsing.
2 - but somebody else (the editor, for instance) has, so 1 is moot.
3 - you can edit your file with whatever indentation style you want: just ask
the editor (the editor would do the unparsing)
4 - you can even choose between different syntaxes. If you prefer indentation
over block delimiters ... go ahead. The mapping from text to syntax tree
would not be part of the language itself, but would be a little
editor-customization !
I'm not saying writing an editor this way is the easiest thing in the
world, but it is possible (there are examples close enough) and it
looks like *the right way* to do things to me.
Stefan
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.