Related articles |
---|
AST's, why are they necessary? Phil@rosl.demon.co.uk (Phil) (1998-08-30) |
Re: AST's, why are they necessary? thetick@magelang.com (Scott Stanchfield) (1998-08-31) |
Re: AST's, why are they necessary? jamz@my-dejanews.com (1998-08-31) |
Re: AST's, why are they necessary? friwi@prosun.first.gmd.de (1998-09-05) |
From: | "Phil" <Phil@rosl.demon.co.uk> |
Newsgroups: | comp.compilers |
Date: | 30 Aug 1998 10:22:22 -0400 |
Organization: | Compilers Central |
Keywords: | parse, question |
Hi all,
I am writing translators to convert about 20 robot languages into our
own proprietary language (a derivative of VB), and on advice I have
been looking into using AST's. However, why would, in this case an
AST give us an advantage over just hand coding the actions into
fprintf statements (for example).
I should stress that speed of development is paramount over speed of
execution.
Cheers,
Phil Royall
[If you just want to do a quick hack, hand coding will certainly work.
But I suspect that if you have 20 input languages, you'll find that
turning them into ASTs, and then using a common back end to emit the
VB will be less work and easier to debug. You can do consistency
checks and rewrites on ASTs that aren't practical without an internal
data structure. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.