comp.lang.ada
 help / color / mirror / Atom feed
From: Craig Carey <research@ijs.co.nz>
Subject: Re: Ada script, anyone
Date: Sun, 18 Dec 2005 07:36:57 +1300
Date: 2005-12-18T07:36:57+13:00	[thread overview]
Message-ID: <2bl8q1t6i837fc1f8uqbb2le2qqq0hi78i@4ax.com> (raw)
In-Reply-To: e1c57d7e65f05c99e17c1622f6661031@localhost.talkaboutprogramming.com

On Fri, 16 Dec 2005 05:26:56 -0500, "Xcriber51" wrote:
...
>This will probably be a (slightly?) absurd question, but is there an Ada
>(script) interpreter? [...] Ken

The Tope symbolic algebra replacement for REDUCE has a GUI front-end
that can replace CMD.EXE. Also an Ada interpreter might have 2 parsers.

An interpreter implementing something similar to Ada might implement
recursion when procedures and packages are nested. It seems a bit too
complex given the competition from real Ada and the very fast
compilation speeds that can be observed.

A sample executables accepting input in 6.txt (eg. "x := a+1;")
http://tope.tigris.org/servlets/ProjectDocumentList
 1.35MB 4 Dec 2005. (2 Ada Yacc parsers in series)

Being developed by me is the Ada preprocessor, which allows this Ada
code containing the "do" keyword:

---------------------
if F then
  if X then goto X15; end; -- no need to write "end if;"
spec
  I2 : Integer;
do
  I2 := 99;
elsif ...
  ...

finally -- all cases that don't go into an "else" part
   iff F in 1 | 2 then A; elif F = 3 then B; end;  -- : A "case" stmt
   ...
end if;     --  Similarly for loops.
---------------------

C always offered a "do" keyword, which a macro can implement as "{ }".

I got GNAT 3.15p Ada and MinGW 3.4.2 Ada to succesfully mix inside of
one executable, ie. without SIGSEGVs.

So C software that runs in Windows can be gradually ported over to GNAT
3.15p Ada (AdaCore's "gnat-3.15p-nt.exe", 18MB).





--  Craig Carey, Auckland




  parent reply	other threads:[~2005-12-17 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-16 10:26 Ada script, anyone Xcriber51
2005-12-16 11:13 ` Alex R. Mosteo
2005-12-16 19:17 ` Jeffrey R. Carter
2005-12-17 11:23 ` Ludovic Brenta
2005-12-19 10:16   ` Alex R. Mosteo
2005-12-17 18:36 ` Craig Carey [this message]
2005-12-18  0:14 ` David Emery
replies disabled

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