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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada platforms and pricing, was: Re: a new language, designed for safety ! Date: Thu, 19 Jun 2014 15:48:43 +0200 Organization: cbb software GmbH Message-ID: References: <1402308235.2520.153.camel@pascal.home.net> <85ioo9yukk.fsf@stephe-leake.org> <255b51cd-b23f-4413-805a-9fea3c70d8b2@googlegroups.com> <5ebe316d-cd84-40fb-a983-9f953f205fef@googlegroups.com> <2100734262424129975.133931laguest-archeia.com@nntp.aioe.org> <857442918424729589.090275laguest-archeia.com@nntp.aioe.org> <9j4b774g2gbz$.a22j8j4ai1l1$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: QTaafVZuunHujkJPndFR7g.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:20453 Date: 2014-06-19T15:48:43+02:00 List-Id: On Thu, 19 Jun 2014 08:08:40 -0400, Peter Chapin wrote: > On 2014-06-19 05:11, Dmitry A. Kazakov wrote: > >>> Maybe it's a vocabulary issue, but it's not the part where tokens are >>> carved out of input text that frighten me, but rather the first level of >>> interpretation: what entity is that word referring to? More >>> specifically, dealing with use clauses, prefix notations, overloading, >>> and stuff like that. >> >> That looks like sematic analysis to me, when you walk the AST finding >> interpretations for each identifier there, prune matched interpretations >> for type errors against competing signatures until there is single >> interpretation for each, or none, or many conflicting. The most horrific >> part is error messages generation. Which requires kind of mind-reading for >> programmer's intention. > > My understand is that parsing Ada requires name resolution to resolve > syntactic ambiguities. This means symbol table management and dealing > with Ada's visibility rules has to be done while parsing is taking place. > > This probably depends on precisely how one goes about the parse. Perhaps > it is possible to live with the ambiguity and generate a useful parse > tree anyway, deferring the rest of the analysis until later, as you say. > I'm not sure right now but it is something I'll need to figure out soon. You treat X.Y and X'Y as plain dyadic operators ("." and "'") and identifiers leaving matching names to the semantics analysis. So, say, Ada.Finalization.Limited_Controlled'Class (X) could become ("'" ("." (Ada, Finalization, Limited_Controlled), Class), X) You need not to know any symbols at this stage, only a fixed set of operators (".", "+", "-", "abs" etc). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de