From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Trouble translating a C++ data-structure. Date: Mon, 12 Mar 2018 18:46:29 -0500 Organization: JSA Research & Innovation Message-ID: References: <1aac45bf-2baf-4ca5-9cb5-07e1748ff6b4@googlegroups.com> <06ffd998-f5b4-4ffd-a23e-cf922df2681b@googlegroups.com> <7a285484-20b5-475e-b252-113b8a803785@googlegroups.com> Injection-Date: Mon, 12 Mar 2018 23:46:29 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="12991"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50948 Date: 2018-03-12T18:46:29-05:00 List-Id: "Shark8" wrote in message news:7a285484-20b5-475e-b252-113b8a803785@googlegroups.com... ... > Yeah, it's a very simple decomposition, but things like semantic-analysis > could be done as a collection of simple transformation-functions and > validators, > perhaps exactly mirroring the LRM. (I haven't gotten into the semantic > analysis, > but this idea appeals to me in that it can allow things do be decomposed > and > maintained easily.) Sounds reasonable, but I have to think every compiler starts out with a grand vision of some sort. And then the real world intrudes and some part of that has to be given up in order for the result to be practical (for instance, Ada requires lengthy lookahead in some cases, so you'll probably find that you will want to cheat a bit and gather some information early to feed into later transformations). In our case, we also had to fit the result on very small machines, so keeping the program completely in memory was impractical (and thus we don't use trees for most of the compilation outside of expressions). Etc. Randy.