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 I. Eachus" Subject: Re: scripting/extension language for Ada (we have an opportunity here) Date: 2000/02/11 Message-ID: <38A47E5A.42406034@earthlink.net>#1/1 X-Deja-AN: 584708212 Content-Transfer-Encoding: 7bit References: <389207CC.C16D80E8@averstar.com> <38971028.BB16D8A2@earthlink.net> <3899F757.FAE131B3@free.fr> <389D43A6.786C7B79@free.fr> <880gpk$fv04@ftp.kvaerner.com> X-Accept-Language: en,pdf Content-Type: text/plain; charset=us-ascii X-ELN-Date: Fri Feb 11 13:21:38 2000 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 950304098 63.24.56.8 (Fri, 11 Feb 2000 13:21:38 PST) Organization: The MITRE Corporation MIME-Version: 1.0 NNTP-Posting-Date: Fri, 11 Feb 2000 13:21:38 PST Newsgroups: comp.lang.ada Date: 2000-02-11T00:00:00+00:00 List-Id: "Tarjei T. Jensen" wrote: > If the Ada community can create a command interpreter which can be extended at > the user level without having to re-link or recompile then we have a winner. > Especially if it can be used embedded into applications. It will simply be too > conventient and powerful to ignore. This sounds like a not too difficult project, in fact the most difficult part will probably be reaching a consensus on the requirements. Since I am a most intrepid sort of person, here is a first cut: Concept: Build a special version of gnat for scripting purposes. The syntax will be pure Ada, while there will be some modifications to the semantics to account for the special purpose. In particular, more implicit conversions will be allowed, and dynamic bindings to environment variables and executable programs. Requirements: 1) The tool shall target both Unix and Windows (95,98,2000,NT 4.0). 2) Procedure, function, (and entry?) calls which do not match a subprogram or entry declared in the script will be searched for using a search path. (Questions: Use the externally defined path, or a local path then the external path? Is there a way to call insure that a call is external?) 3) Conversions between Strings, Bounded_Strings, and Unbounded_Strings shall be implicit. (Should there be a "standard" instantiation of Bounded_Strings, or should it be possible to declare a variable as: Foo: Bounded_String(1024); or something similar?) 4) Environment variables shall be treated as String (Unbounded_String?) variables in an outer scope, and shall be hidden by identically named variables in inner scopes. (In other words, it must be possible to pass a modified set of environment variables to nested calls.) 5) It shall be possible to explicitly designate executable programs or scripts in the environment. (In other words it must be possible to bypass the search path to get to, say, /bin/sh, pragma External_Name is probably the best way to do this.) 6) Arguments passed to the script/program on the command line shall be accessable. (Special version of Ada.Command_Line if necessary.) Anything else?