Re: The semicolon habit (was: Q: Definition of a scripting lang.)

bevan@cs.man.ac.uk (Stephen J Bevan)
Mon, 15 May 1995 10:06:00 GMT

          From comp.compilers

Related articles
[19 earlier articles]
Re: The semicolon habit (was: Q: Definition of a scripting lang.) cef@geodesic.com (Charles Fiterman) (1995-05-11)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) plong@perf.com (1995-05-11)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) stidev@gate.net (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) rabin@CS.YALE.EDU (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) plong@perf.com (1995-05-12)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-15)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-15)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) Charles.Fiterman@bluebird.uchicago.edu (1995-05-28)
Editing/storing syntax trees preston@tera.com (1995-05-28)
| List of all articles for this month |

Newsgroups: comp.compilers
From: bevan@cs.man.ac.uk (Stephen J Bevan)
Keywords: design, comment
Organization: Department of Computer Science; University of Manchester
References: 95-04-013 95-05-078
Date: Mon, 15 May 1995 10:06:00 GMT

Stefan Monnier <monnier@di.epfl.ch> writes:
      ... Wouldn't it be so much easier to store your source as a syntax-tree ?


I theory I agree, but practice seems to be lagging a long way behind
(examples to the contrary are welcome). One of the thorniest problems
is what to do with comments i.e. what syntactical construct to you
attach a comment to? If you have the luxury of working with a new
language these issues can be taken into account in the language
design, but with legacy code/languages things are tougher without
resorting to style guides and their enforcement. Once you do that
you'll find you've solved most of the problem without the need for
syntax tree storage.
[Editing a syntax tree is a pain, too, since editing operations you do on
source text rarely map cleanly to syntax changes. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.