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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa2cc518ef3b992c X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: scripting/extension language for Ada (we have an opportunity here) Date: 2000/02/16 Message-ID: #1/1 X-Deja-AN: 586605707 Sender: bobduff@world.std.com (Robert A Duff) References: <389207CC.C16D80E8@averstar.com> <38971028.BB16D8A2@earthlink.net> <3899F757.FAE131B3@free.fr> <389D43A6.786C7B79@free.fr> <880gpk$fv04@ftp.kvaerner.com> <38A47E5A42406034@earthlink.net> <38A53714.3EBC10C3@online.no> <38A5E4FC.9C20A0E4@Raytheon.com> <38A9A7D4.5331F2C3@Raytheon.com> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-02-16T00:00:00+00:00 List-Id: "Samuel T. Harris" writes: > Certainly I can. Since [] and {} are not legal Ada tokens, > they many only appear in comments and string literals. > A syntax to handle these so that other [] and {} > are converted to () is trivial to do. No, I don't think it's trivial to do it right. Consider: procedure Main is function F return String is begin return "A"; end F; procedure Nested is function F(X: Integer) return Character is begin return 'B'; end F; begin Text_IO.Put(F[1]); -- Not Ada. end Nested; begin Nested; end Main; Presumably the F[1] above resolves to the outer F, which returns an array, so the program prints "A". If you "trivially" transform "[...]" into "(...)" you will get an illegal (ambiguous) Ada program. - Bob