Related articles |
---|
Intermediate Representation simon_google@mookstar.co.uk (2001-10-10) |
Re: Intermediate Representation jbeniston@siroyan.com (Jon Beniston) (2001-10-12) |
Re: Intermediate Representation vbdis@aol.com (2001-10-12) |
Intermediate Representation napi@rangkom.MY (1990-08-07) |
Re: Intermediate Representation briscoe-duke@CS.YALE.EDU (Duke Briscoe) (1990-08-08) |
Re: Intermediate Representation preston@rice.edu (Preston Briggs) (1990-08-08) |
Re: Intermediate Representation mod@westford.ccur.com (Michael O'Donnell (508)392-2915) (1990-08-09) |
Re: Intermediate Representation grover@brahmand.Eng.Sun.COM (1990-08-09) |
Re: Intermediate Representation preston@titan.rice.edu (1990-08-10) |
Re: Intermediate Representation larus@primost.cs.wisc.edu (1990-08-12) |
Re: Intermediate Representation grover@brahmand.Eng.Sun.COM (1990-08-12) |
Re: Intermediate Representation hankd@dynamo.ecn.purdue.edu (1990-08-12) |
Re: Intermediate Representation jouvelot@brokaw.lcs.mit.edu (1990-08-12) |
[15 later articles] |
Newsgroups: | comp.compilers |
From: | Michael O'Donnell (508)392-2915 <mod@westford.ccur.com> |
In-Reply-To: | <1990Aug07.153407.8877@esegue.segue.boston.ma.us> |
Summary: | A comment and some questions |
Keywords: | code,optimize |
Organization: | Concurrent Computer Corp. - Westford, Ma |
Date: | Thu, 09 Aug 90 18:03:37 GMT |
In article <1990Aug07.153407.8877@esegue.segue.boston.ma.us> napi@rangkom.MY (Mo
hd Hanafiah b. Abdullah) writes:
>I would like know what people think is the best Intermediate Representation
...
>(1) Abstract-syntax-tree (looks like Scheme code)
...
>I'm more leaning towards "abstract-syntax-tree" since it is portable (machine
>independent), readable, visibility of high-level structures (eg. loops) for
>effective optimizations, language independent most of the time.
...
I'm just a beginner at this and I recently built a "student" compiler in a
university Compiler Construction class. The text and the instructor were
both presenting an LR(1)/tuple implementation coded in Pascal. I pushed hard
for (and obtained) permission to instead use a Lex/Yacc/AST approach written
in C. My amateur's opinion is probably not worth much here, but it seems
apparent to me that AST's are the easiest IR to manipulate, especially
considering the amount of information they can contain. I didn't use DAG's
(they seem like an inspired twist on the notion of an AST) because I found
their (perceived) complexity a bit daunting. Well, enough noise - now for my
question:
Why do you make several references to the "visual" attributes of an AST? My
instructor and textbook (Fischer/LeBlanc) only touched lightly on AST's and I
had to infer a lot from that little bit. Is there a standard textual
representation of AST's? Mine only existed as data structures in memory,
although the Dragon book mentioned that there is a kind of postfix
representation. Is that it?
Thanks,
Michael O'Donnell (508)392-2915 home(508)251-7576 fax(508)692-8307
...!{harvard,uunet,petsd}!masscomp!mod, mod@westford.ccur.com
Concurrent Computer Corporation, 1 Technology Way, Westford, MA 01886
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.