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 X-Google-Thread: 103376,fa2cc518ef3b992c X-Google-Attributes: gid103376,public From: "Samuel T. Harris" Subject: Re: scripting/extension language for Ada (we have an opportunity here) Date: 2000/02/12 Message-ID: <38A5E4FC.9C20A0E4@Raytheon.com>#1/1 X-Deja-AN: 585126207 Content-Transfer-Encoding: quoted-printable References: <389207CC.C16D80E8@averstar.com> <38971028.BB16D8A2@earthlink.net> <3899F757.FAE131B3@free.fr> <389D43A6.786C7B79@free.fr> <880gpk$fv04@ftp.kvaerner.com> <38A47E5A.42406034@earthlink.net> <38A53714.3EBC10C3@online.no> X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 Organization: Raytheon Aerospace Engineering Services Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-02-12T00:00:00+00:00 List-Id: "Tarjei Tj=F8stheim Jensen" wrote: > = > Robert I. Eachus wrote: > = > > > > Concept: Build a special version of gnat for scripting purposes. > > The syntax will be pure Ada, while there will be some modifications t= o > > the semantics to account for the special purpose. In particular, mor= e > > implicit conversions will be allowed, and dynamic bindings to > > environment variables and executable programs. > > > = > You have started in the wrong direction. Such an interpreter should hav= e an Ada-ish > look and feel, but it should not be Ada. E.g. I strongly believe that i= t should use > "[" and "]" for arrays. There should be reasonable defaults. > = > The attribute system as found in ada should be simplified. It should be= possible to > write a :=3D a'succ; or something similar and short. > = > s1 : string; -- unbounded string > s2 : string[5]; -- string of maximum length 5, but dynamically sizeable= I have no problem with using [] instead of () for array indexing. The [] can be easily converted back to () for use in a conventional compiler. Along this line, {} can be used for aggregates. Parsing Ada is notoriously difficult because of the overloading of () for indexes, subprograms, and aggregates. > = > > 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 t= hen > > the external path? Is there a way to call insure that a call is > > external?) > = > It should be possible to specify how to treat certain names and how to = search. E.g. > it should be possible to specify that if a command has a given name, th= en a given > command should be executed as in alias in a bash/korn shell. It should = be possible > to specify that if a program cannot be found in a search path, then one= should > search for e.g. program.ksh, program.sh, program.pl, program.py, etc. i= n the path. See my previous post on package PATH. External command locations can be specified with pragma interface_name. External commands already know how to execute themselves whether they are bash/korn shell, sed scripts, whatever. -- = Samuel T. Harris, Principal Engineer Raytheon, Aerospace Engineering Services "If you can make it, We can fake it!"