Editing/storing syntax trees

preston@tera.com (Preston Briggs)
Sun, 28 May 1995 22:50:54 GMT

          From comp.compilers

Related articles
Re: Q: Definition of a scripting lang. lwall@netlabs.com (1995-03-27)
Re: The semicolon habit (was: Q: Definition of a scripting lang.) bevan@cs.man.ac.uk (1995-05-15)
Editing/storing syntax trees preston@tera.com (1995-05-28)
Re: Editing/storing syntax trees stefan.monnier@epfl.ch (Stefan Monnier) (1995-06-05)
Re: Editing/storing syntax trees hbaker@netcom.com (1995-06-23)
Re: Editing/storing syntax trees daniels@cse.ogi.edu (1995-06-23)
Re: Editing/storing syntax trees bevan@cs.man.ac.uk (1995-06-23)
Re: Editing/storing syntax trees frode@news2.deltanet.com (Frode Odegard) (1995-06-24)
Re: Editing/storing syntax trees hagerman@ece.cmu.edu (1995-06-24)
[5 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: preston@tera.com (Preston Briggs)
Keywords: design, syntax
Organization: Tera Computer Company, Seattle, WA
References: 95-04-013 95-05-104
Date: Sun, 28 May 1995 22:50:54 GMT

> ... Wouldn't it be so much easier to store your source as a syntax-tree ?
>In theory I agree, ...

I disagree. ASCII source is actually a fine representation, small and
convenient. Syntax trees, on disk, are bulky and inconvenient.

Separate your concerns. Use a single, good editor for all your
programming languages, and individual compilers for each language.
Otherwise, you get stuck using/writing a new editor for each new
language. You might be able to make them all feel the same, but it's
still a major multiplication of your programming effort.

If you want general access to a syntax tree, say for use by several
different tools, write a single scanner-parser combination that builds
a tree form from the source form; but please don't multiply your editors.

Preston Briggs

Post a followup to this message

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