comp.lang.ada
 help / color / mirror / Atom feed
From: "Samuel T. Harris" <samuel_t_harris@Raytheon.com>
Subject: Re: scripting/extension language for Ada (we have an opportunity here)
Date: 2000/02/12
Date: 2000-02-12T00:00:00+00:00	[thread overview]
Message-ID: <38A5E340.21B7265B@Raytheon.com> (raw)
In-Reply-To: 38A47E5A.42406034@earthlink.net

"Robert I. Eachus" wrote:
> 
> "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?)

The shell engine can process the path and produce a PATH package
containing subprogram specs for everything visible. A special
classification for the required pragma interface can be used.
The engine can be configured to "know" the argument profile
of certain commands. Others can take a single string argument.

> 
>       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?)

I'd rather see a package with a rich set of predefined "+"
operations for all th necessary conversions.

> 
>       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.)

Again, the shell engine can produce a package ENV containing
access to string variables representing the environment.
Access to the environment must also be supported by subprograms
because the environment is a dynamic association of ordered
pairs of strings and cannot be entirely captures as a list
of string variables.

> 
>       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.)

Exactly. This fits with the predefined package PATH. A pragma interface
classification will also be needed to specify the subprogram is
an external executable. I'm not sure EXTERNAL really conveys the
meaning here so other suggestions are solicited.

> 
>       6) Arguments passed to the script/program on the command line
> shall be accessable.  (Special version of Ada.Command_Line if
> necessary.)

Why should the script program be a parameterless procedure.
It can have parameters. Boolean parameters can be assumed to
be switches. Other parameters can be command-line arguments.
Named Ada notation fits nicely with UNIX switches which
require arguments. The shell engine can parse the switches
and arguments on the UNIX command line and fit them into
the script programs parameter list.

> 
>       Anything else?

-- 
Samuel T. Harris, Principal Engineer
Raytheon, Aerospace Engineering Services
"If you can make it, We can fake it!"




  parent reply	other threads:[~2000-02-12  0:00 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-27  0:00 tagged types extensions - language design question Vladimir Olensky
2000-01-27  0:00 ` Fraser
2000-01-27  0:00 ` Laurent Guerby
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Andy
2000-01-28  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Andy
2000-01-31  0:00           ` Vladimir Olensky
2000-01-27  0:00 ` Matthew Heaney
2000-01-27  0:00   ` Charles Hixson
2000-01-28  0:00   ` Vladimir Olensky
2000-01-28  0:00     ` Matthew Heaney
2000-01-28  0:00       ` Charles Hixson
2000-01-28  0:00         ` Matthew Heaney
2000-02-01  0:00           ` Charles Hixson
2000-02-01  0:00             ` Matthew Heaney
2000-01-29  0:00       ` Vladimir Olensky
2000-01-29  0:00         ` Matthew Heaney
2000-01-31  0:00           ` Vladimir Olensky
2000-01-31  0:00             ` Matthew Heaney
2000-01-31  0:00               ` Vladimir Olensky
2000-01-29  0:00         ` Matthew Heaney
2000-01-28  0:00 ` Tucker Taft
2000-01-31  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Charles Hixson
2000-02-01  0:00     ` Matthew Heaney
2000-02-01  0:00       ` Brian Rogoff
2000-02-03  0:00         ` scripting/extension language for Ada (was : Re: tagged types extensions) root
2000-02-03  0:00           ` Brian Rogoff
2000-02-04  0:00             ` Ray Blaak
2000-02-04  0:00               ` Robert A Duff
2000-02-05  0:00                 ` Ehud Lamm
2000-02-05  0:00                 ` blaak
2000-02-05  0:00                   ` Brian Rogoff
2000-02-09  0:00                   ` Robert A Duff
2000-02-09  0:00                     ` Ted Dennison
2000-02-10  0:00                       ` Samuel T. Harris
2000-02-10  0:00                 ` Pascal Martin
2000-02-10  0:00                   ` Ray Blaak
2000-02-11  0:00                     ` scripting/extension language for Ada (we have an opportunity here) Tarjei T. Jensen
2000-02-11  0:00                       ` Robert I. Eachus
2000-02-12  0:00                         ` Pascal Martin
2000-02-13  0:00                           ` Robert I. Eachus
2000-02-16  0:00                             ` scripting/extension ... [off topic] Nick Roberts
2000-02-16  0:00                               ` Ray Blaak
2000-02-12  0:00                         ` scripting/extension language for Ada (we have an opportunity here) Tarjei Tj�stheim Jensen
2000-02-12  0:00                           ` Samuel T. Harris
2000-02-14  0:00                             ` Robert A Duff
2000-02-15  0:00                               ` Samuel T. Harris
2000-02-16  0:00                                 ` Robert A Duff
2000-02-16  0:00                                   ` Samuel T. Harris
2000-02-16  0:00                                     ` Robert A Duff
2000-02-17  0:00                                       ` Samuel T. Harris
2000-02-12  0:00                           ` root
2000-02-12  0:00                         ` blaak
2000-02-12  0:00                         ` Samuel T. Harris [this message]
2000-02-11  0:00                     ` scripting/extension language for Ada (was : Re: tagged types extensions) David Starner
2000-02-12  0:00                       ` blaak
2000-02-15  0:00                         ` Brian Rogoff
2000-02-12  0:00                       ` Pascal Martin
2000-02-14  0:00                     ` Robert A Duff
2000-02-04  0:00               ` Stanley R. Allen
2000-02-04  0:00                 ` Samuel T. Harris
2000-02-05  0:00                   ` Lionel Draghi
2000-02-05  0:00                     ` Samuel T. Harris
2000-02-06  0:00                       ` Bryce Bardin
2000-02-08  0:00                         ` Samuel T. Harris
2000-02-06  0:00                       ` Lionel Draghi
2000-02-05  0:00                 ` Lionel Draghi
2000-02-05  0:00                 ` Ray Blaak
2000-02-05  0:00             ` scripting/extension language for Ada (was : Re: tagged typesextensions) Lionel Draghi
2000-02-05  0:00           ` scripting/extension language for Ada (was : Re: tagged types extensions) Ehud Lamm
2000-02-06  0:00             ` Lionel Draghi
2000-02-06  0:00               ` Ehud Lamm
2000-02-06  0:00               ` scripting/extension language for Ada Terry Westley
2000-02-09  0:00               ` scripting/extension language for Ada (was : Re: tagged types extensions) Robert A Duff
2000-01-31  0:00 ` tagged types extensions - language design question Mark Lundquist
2000-02-01  0:00   ` Vladimir Olensky
2000-02-01  0:00   ` Simon Wright
2000-02-01  0:00   ` Ehud Lamm
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox