Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Portability/Standardization of Ada

1 view
Skip to first unread message

Thomas Dunbar

unread,
Jul 20, 1995, 3:00:00 AM7/20/95
to
i'm starting to look at Ada .. imo, the amount of useful source code
in a given language has much to do with its value. So, i've started
looking around for Ada source. The first thing that caught my eye
was aflex/ayacc, a lex/yacc pair written in Ada and producing Ada
code.

However, as i looked at trying to compile (using GNAT), i was a bit
shocked. I find subdirs with code for various Ada compilers! now,
i'm used to programs in C in which i just say "make" in the source
dir on my Linux box and GCC compiles it fine or, on my Solaris box
and CC compiles it fine. sometimes (but) a "configure" is needed
to setup for the particular hardware (and Unix flavor of includes, etc).

However, this different source trees for different compilers is
rather disconcerting when one's been hearing of Ada's standardization
advantages over C++

as the the particular problem at hand, anyone have a aflex/ayacc
source tree for GNAT available?

thanks,
thomas

--
Thomas Dunbar 540 231-3938 http://gserver.grads.vt.edu/


Theodore Dennison

unread,
Jul 21, 1995, 3:00:00 AM7/21/95
to
Thomas Dunbar <tdu...@gserver.grads.vt.edu> wrote:
>i'm starting to look at Ada .. imo, the amount of useful source code
>in a given language has much to do with its value. So, i've started
>looking around for Ada source. The first thing that caught my eye
>was aflex/ayacc, a lex/yacc pair written in Ada and producing Ada
>code.
>
>However, as i looked at trying to compile (using GNAT), i was a bit
>shocked. I find subdirs with code for various Ada compilers! now,
>i'm used to programs in C in which i just say "make" in the source
>dir on my Linux box and GCC compiles it fine or, on my Solaris box
>and CC compiles it fine. sometimes (but) a "configure" is needed
>to setup for the particular hardware (and Unix flavor of includes, etc).
>
>However, this different source trees for different compilers is
>rather disconcerting when one's been hearing of Ada's standardization
>advantages over C++

I'm suprised you never had to do more that. I have installed emacs and
gcc on several different systems, and I have NEVER had it work that easily.
There is always some tweak I have to make to a "Makefile" or a .h file to get
it to find some include file or other. Yuuuuk.

BTW: If you had LOOKED at the C programs you were compiling, you would have
seen an unadulterated mess of "#ifdef" statements. It really ISN'T the
same C source being compiled on different compilers and OS's. Its different
chunks of mutually-exclusive code all slammed together into the same file.

I suppose this practice has its advantages, but if you need to make a
modification to the source, its a nightmare.
"Why isn't this working!!!!"
(30 minutes later)
"Ohhhh! That part's ifdef'ed out! Wait! So how is this done on MY
system???"

If folks really wanted to, I suppose they could simulate this with Ada
generics. The mess that that would make is so much counter to the Ada
philosophy, that I'm not too suprised to see no one doing it.

--
T.E.D.
| Work - mailto:denn...@escmail.orl.mmc.com |
| Home - mailto:denn...@iag.net |
| URL - http://www.iag.net/~dennison |


Michael Feldman

unread,
Jul 21, 1995, 3:00:00 AM7/21/95
to
In article <3ulk9n$5...@solaris.cc.vt.edu>,
Thomas Dunbar <tdu...@gserver.grads.vt.edu> wrote:

>However, as i looked at trying to compile (using GNAT), i was a bit
>shocked. I find subdirs with code for various Ada compilers! now,
>i'm used to programs in C in which i just say "make" in the source
>dir on my Linux box and GCC compiles it fine or, on my Solaris box
>and CC compiles it fine. sometimes (but) a "configure" is needed
>to setup for the particular hardware (and Unix flavor of includes, etc).

And also, C code is often filled with conditional compilations to
account for system differences.

>However, this different source trees for different compilers is
>rather disconcerting when one's been hearing of Ada's standardization
>advantages over C++

My guess is that the implementation-dependent bodies probably relate
to areas not covered by the Ada 83 standard. They may be interfacing to
the OS in some way. Remember that Aflex/Ayacc were developed years ago,
when many folks used VMS, so at least they needed VMS and Unix interfaces.
Pragma Interface in Ada 83 is fairly poorly defined, so any system
interfaces were necessarily nonportable. This is mostly fixed in Ada 95.

>as the the particular problem at hand, anyone have a aflex/ayacc
>source tree for GNAT available?

A note on this was posted a number of weeks ago, by someone in Europe.
I thought it was going to be put in the GNAT contrib library. I just
checked and it is not there; what happened?

In any case, it does exist; maybe someone else will post it.

Mike Feldman

Ralph Paul

unread,
Jul 26, 1995, 3:00:00 AM7/26/95
to
In article <3upj6o$q...@felix.seas.gwu.edu> mfel...@seas.gwu.edu (Michael

Hello,

the ftp site for aflex/ayacc for gnat is :
ftp.uni-stuttgart.de:/pub/programming/Ada/GNAT
this version was ported for gnat 2.00 and should work.

I have made some changes so that aflex will not crash when reading ASCII
character's greater than 127. I haven't had the time ( and the sysop )
to put this on the ftp server yet. Also the command-line interface is
very crude and I ( my version ) cannot regenerate aflex with itself.

If you need the full range of characters contact me ( very few changes )

Ralph Paul

ra...@ifr.luftfahrt.uni-stuttgart.de
ra...@studbox.uni-stuttgart.de

0 new messages