Re: standard intermediate representation for C/C++ ?

Stephen J Bevan <bevan@computer-science.manchester.ac.uk>
Sat, 16 May 1992 08:45:23 GMT

          From comp.compilers

Related articles
[4 earlier articles]
Re: standard intermediate representation for C/C++ ? root@grok19.columbiasc.NCR.COM (Dave Howell) (1992-05-11)
Re: standard intermediate representation for C/C++ ? dalamb@qucis.queensu.ca (1992-05-13)
Re: standard intermediate representation for C/C++ ? rascal@verdix.com (1992-05-14)
Re: standard intermediate representation for C/C++ ? bevan@computer-science.manchester.ac.uk (Stephen J Bevan) (1992-05-15)
Re: standard intermediate representation for C/C++ ? macrakis@osf.org (1992-05-15)
Re: standard intermediate representation for C/C++ ? mjordan@src.dec.com (1992-05-15)
Re: standard intermediate representation for C/C++ ? bevan@computer-science.manchester.ac.uk (Stephen J Bevan) (1992-05-16)
Re: standard intermediate representation for C/C++ ? kendall@centerline.com (1992-05-27)
| List of all articles for this month |
Newsgroups: comp.compilers
From: Stephen J Bevan <bevan@computer-science.manchester.ac.uk>
Keywords: C, design, AST
Organization: Compilers Central
References: 92-05-065 92-05-095
Date: Sat, 16 May 1992 08:45:23 GMT

May 92 07:17:55 GMT


    [Can you really do a DIANA-like thing for C? I'd think that the syntactic
    messiness introduced by the preprocessor would make it awfully hard to
    come up with anything that was simultaneously easier to handle than the
    original source and didn't lose something significant in translation. -John]


Considering the mess you can generate with macros and #ifdefs, I think a
good C-DIANA would be very tough (if not impossible) to design. However,
I think this says more about the design (sic) of C(++) than it does about
DIANA like standards.


Reverse engineering a standard AST from a concrete syntax is always going
to be tough. However, the simple solution is to design the language
around the abstract syntax instead of the concrete syntax. This has many
benefits, one of which is a standard AST for "free".


This is a simple idea that is almost 30 years old, however, it seems that
the many budding language designers are either ignorant of it or choose to
ignore it for some reason. Either way, it is very depressing as it just
leads to the proliferation of (syntactically) badly designed languages.


Stephen J. Bevan bevan@cs.man.ac.uk
--


Post a followup to this message

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