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

Writing a Mac Ada compiler

20 views
Skip to first unread message

Mike White

unread,
Mar 6, 1995, 5:09:11 PM3/6/95
to
Could anyone give me an idea of about how much of an effort it would be
to write an Ada compiler for the mac/powermac (or if youve had similar
experience on other computers...). I am quite dismayed by the general
lack of Ada support on the mac and I figure others are too. I have heard of
compilers being ported to the mac, but a) I'd rather not wait and
b) I imagine it would be quite a learning experience. Call me crazy.
Anyways, would it be MUCH more difficult to write an ada 9x compiler
than ada83?

mike white

Theodore E. Dennison

unread,
Mar 7, 1995, 8:46:05 AM3/7/95
to
Mike White <ons...@twain.oit.umass.edu> wrote:
> Could anyone give me an idea of about how much of an effort it would be
> to write an Ada compiler for the mac/powermac (or if youve had similar
> experience on other computers...). I am quite dismayed by the general

I would imagine most Ada compilers (even crappy ones) take at least 10
man-years
to complete. It really isn't a project for a single person. Yes, I have made
a start of it (on the late, great, Amiga). Completing the lexer alone would
have
taken me over a month. The parser? <shudder>

> lack of Ada support on the mac and I figure others are too. I have heard of
> compilers being ported to the mac, but a) I'd rather not wait and
> b) I imagine it would be quite a learning experience. Call me crazy.

You're crazy.


> Anyways, would it be MUCH more difficult to write an ada 9x compiler
> than ada83?

Uhh, unless I'm mistaken, GNAT is available for the MAC. If it doesn't exist
for
the MAC, porting it WOULD be a job one person could accomplish. You might want
to consider that instead of building your own from scratch.

If you really want to build your own compiler as an exercise, why not try
something smaller?

Good luck, and I'm sorry I was so negative.
T.E.D.

Laurent Gasser

unread,
Mar 7, 1995, 12:17:43 PM3/7/95
to
If you really know of a port of GNAT for Mac, I would be very
interested to know about. To my knowledge, it has not yet appeared
because gcc 2.6.2 is not available for Mac.

Wishfully mistaking...

In article <3jho2t$g...@theopolis.orl.mmc.com>, "Theodore E. Dennison" <denn...@escmail.orl.mmc.com> writes:
|> Uhh, unless I'm mistaken, GNAT is available for the MAC. If it doesn't exist
|> for
|> the MAC, porting it WOULD be a job one person could accomplish. You might want
|> to consider that instead of building your own from scratch.
|>
|> If you really want to build your own compiler as an exercise, why not try
|> something smaller?
|>
|> Good luck, and I'm sorry I was so negative.
|> T.E.D.
|>

--
Laurent Gasser (gas...@dma.epfl.ch)
Computers do not solve problems, they execute solutions.

Arthur Evans Jr

unread,
Mar 6, 1995, 9:04:22 PM3/6/95
to
In article <3jg167$a...@nic.umass.edu>, con...@twain.oit.umass.edu
(Mike White) wrote:

> Could anyone give me an idea of about how much of an effort it would be

> to write an Ada compiler for the Mac ...

Many dozens of person-years.

> I am quite dismayed by the general
> lack of Ada support on the mac and I figure others are too.

Yes, many of are dismayed.

If you have time on your hands and want to address this problem, port
GCC 2.6.3 to the Mac, and then bootstrap GNAT. That's a much more
modest task and will result in a first class compiler.

And many of us will applaud loudly!

Art Evans

Arthur Evans Jr, PhD Phone: 412-963-0839
Ada Consulting FAX: 412-963-0927
461 Fairview Road
Pittsburgh PA 15238-1933
ev...@evans.pgh.pa.us

Mark Johannes

unread,
Mar 7, 1995, 4:31:26 PM3/7/95
to
In article <3ji8rc$r...@nic.umass.edu>, con...@twain.oit.umass.edu (Mike White) writes:
>Arthur Evans Jr (ev...@evans.pgh.pa.us) wrote:
>
>: If you have time on your hands and want to address this problem, port

>: GCC 2.6.3 to the Mac, and then bootstrap GNAT. That's a much more
>: modest task and will result in a first class compiler.
>
Amen...

>Would it really be that much easier to port it? Have you seen the source
>code? I haven't, so I am wondering how well designed/documented it is.
>I realize it's a pretty big task, but 10+ man-years? O.K. I'll admit
>it's probably not a one-man project, but if others were interested in
>working on such a project...
>

Yes you would have to learn something about the internals of GCC but
you would not have to write the large mass of code known as a compiler.
Unless I am horribly off base here, your effort would focus on providing
host configuration files and host specific code. Since both the m68k and
PowerPC families are well covered by GCC/GNAT.

> I mean seriously, I wrote a simple lexer and parser (both using Ada
>by the way) in my systems class both in a semester. Both of these
>were easily extensible for large projects, and the grammar
>for Ada is widely available. Beyond that, converting to machine code
>would seem my biggest problem, never having done mac or powermac assembly.
>Interfacing with mac system calls seems pretty basic since they are well
>defined. I imagine one would convert the parameter conventions from Ada
>to the system via MacHeaders.

yes a lexer and parser may not be too tough for you to develop but.. you need
2 code generators, linkers, assemblers, debuggers, and Ada runtime support
to have a full environment. Again your effort should be restricted to providing
MAC specific support. -- not reinventing the wheel.

I personally don't relish the idea of even using the machine_code package
much less implementing it.

> Just some thoughts. I need to do some more research obviously before
>making any attempt. Anyone interested in participating on a joint effort,
>either working from scratch or doing a port? Please reply here so that
>everyone interested can read it, myself included.
>
>mike white

And let's not forget this issue: support and maintenance. The GNU tools
have a lot of users. There is a large body of code shared between the C, Ada,
Pascal, and now Fortran users. This significantly increases the user population
for the toolset. Yes the port itself may only have a handful of users..but the
code generator and other support components are shared and have who knows
how many users. So the odds of finding bugs at a serious level are significantly
reduced.

Finally, a port of GNU Ada gives a lot more to the MAC community than an Ada
compiler. It lays (all??) of the groundwork for ports of other GNU languages and
gets enough tools in place to allow ports of other GNU tools. Wouldn't GNU C
work when/before GNAT did? C++, Objective-C, Fortran, and Pascal would not
be far behind. it starts as a trickle of tools and ends as the Hurd .. (sorry could
not resist).

I probably missed something... but you get the idea.

Joel Sherrill
jshe...@merlin.gcs.redstone.army.mil


Robert Dewar

unread,
Mar 7, 1995, 8:08:45 PM3/7/95
to
Mike White asks about writing an Ada 95 compiler from scratch for the MAC.
This is certainly a feasible project but a large one. 15-25 person years
is a reasonable estimate of the total effort required, if you count
maintenance into the future, this may be low. Yes, Ada 95 is considerably
harder to implement than Ada 83, it is a much bigger language, the new
features, and the annexes, add a LOT of effort.

A more practical effort (by more than an order of magnitude) would be
to port GNAT to the MAC, and it would be nice if someone completed this
port!

Mike White

unread,
Mar 7, 1995, 1:32:12 PM3/7/95
to
Arthur Evans Jr (ev...@evans.pgh.pa.us) wrote:

: If you have time on your hands and want to address this problem, port


: GCC 2.6.3 to the Mac, and then bootstrap GNAT. That's a much more
: modest task and will result in a first class compiler.

Would it really be that much easier to port it? Have you seen the source


code? I haven't, so I am wondering how well designed/documented it is.
I realize it's a pretty big task, but 10+ man-years? O.K. I'll admit
it's probably not a one-man project, but if others were interested in
working on such a project...

I mean seriously, I wrote a simple lexer and parser (both using Ada


by the way) in my systems class both in a semester. Both of these
were easily extensible for large projects, and the grammar
for Ada is widely available. Beyond that, converting to machine code
would seem my biggest problem, never having done mac or powermac assembly.
Interfacing with mac system calls seems pretty basic since they are well
defined. I imagine one would convert the parameter conventions from Ada
to the system via MacHeaders.

Just some thoughts. I need to do some more research obviously before

David Weller

unread,
Mar 7, 1995, 1:37:28 PM3/7/95
to
In article <evans-060...@evans.pgh.pa.us>,

Arthur Evans Jr <ev...@evans.pgh.pa.us> wrote:
>
>If you have time on your hands and want to address this problem, port
>GCC 2.6.3 to the Mac, and then bootstrap GNAT. That's a much more
>modest task and will result in a first class compiler.
>
>And many of us will applaud loudly!
>

I think Cygnus would be glad to undertake that task for somewhere
around $100K. Anybody want to start a collection pool? :-)


--
Frustrated with C, C++, Pascal, Fortran? Ada95 _might_ be for you!
For all sorts of interesting Ada95 tidbits, run the command:
"finger dwe...@starbase.neosoft.com | more" (or e-mail with "finger" as subj.)

Mike White

unread,
Mar 8, 1995, 12:39:21 PM3/8/95
to

Lots of people wrote:

: Lots of helpful things.

Yes, as I was thinking it over, I realized that I had not fully considered
the size of the project I proposed. Everyone seems to be pointing to a
port of GCC 2.6.3 and then compiling GNAT, thus making the world happy.
At first I winced at the concept of porting GCC, but it does seem a lot
more reasonable than "reinventing the wheel". I unfortunately don't know
much about GNAT, and have limited experience with compiler design. I was
basically trying to find out if, as a learning experience, writing an Ada
compiler from scratch was a doable project. (plus I really prefer building
up my own code than working on others' code, but hey, who doesn't?)

Obviously the approach I was considering is not really feasible, and I
appreciate the warnings!

So, porting GCC and then GNAT on top of that is the way to go. Or, just
as a learning experience, implement a subset of Ada... I'm gonna have
to start looking into those GCC sources, I guess!

mike white

Tucker Taft

unread,
Mar 7, 1995, 9:09:16 PM3/7/95
to
Mike White (con...@twain.oit.umass.edu) wrote:

: Could anyone give me an idea of about how much of an effort it would be

Writing a full compiler for a language like C++, Ada 95, Fortran 90,
Eiffel, Modula-3, etc., is generally a 10-30 person-year effort.
On the other hand, if you just want something relatively simple
for your own use, you could ignore all the nasty parts and try
to put something together using Yacc, Lex, and some existing
simple public domain compiler (I believe there is at least one
such free C compiler for the Mac). You could build it up slowly
over time. For even more fun ;-), you might try to bootstrap early,
once you can compile very simple programs.

If you can wait until the beginning of next year, the Academic Ada
compiler will be coming out for the PC and the PowerMac. Or you could
take GNAT and put your energy into porting that. Porting GNAT is
probably about 100 times simpler than building a compiler from scratch.

In any case, the GW Ada/Ed for the Mac is quite nice for small programs.
You could probably use it as your "bootstrap" compiler at least.

: mike white

-Tucker Taft s...@inmet.com
Intermetrics, Inc.

Mike White

unread,
Mar 9, 1995, 2:25:56 PM3/9/95
to
Robert Dewar (de...@cs.nyu.edu) wrote:
: Mike, at this stage, I am afraid your lack of familiarity with compiler
: technology is showing. Writing a lexical analyzer and parser for Ada is
: by comparison with the rest of the task simple, but even these very
: simple tasks are by no means trivial, especially if you want to get
: any kind of decent error messages.

Very true. I DO lack familiarity with compiler technology. I am an
undergrad with NO real-life experience in compiler design. I do,
however, feel that I have an understanding of most of the pieces
which go into a compiler, and was interested in seeing if I can pull
those pieces together and learn something about overall compiler design.

: As for the idea that the only remaining step is generating machine language,
: I am afraid it seems that your cource on compilers gave a rather false
: impression. The hard part of an Ada compiler is the semantic analysis.

True. I definitely took a simplistic view of what a compiler is. This
whole thread is based on an interest of mine which I wanted to get some
input on, and I posted some things which I did not think through.

(By the way, I have definitely decided against designing a compiler from
scratch.)

: [more]

: As for porting GCC, this is a task that is probably about one twentieth the
: effort of writing a compiler, but that too expects you to have significant
: experience with GCC and the technology. If you are starting from scratch
: and know little about compilers and processor architectures, you have a lot
: to learn before you can succeed in such a port.

: [more]

I do sincerely appreciate these comments. I freely admit I am naive
about compilers as my coursework has only provided me with a general
background in computer science, and not much in compilers. However, my
coursework _has_ included courses in computer architecture, assembly
language, programming languages, software engineering, and operating
systems. I have been programming Macs (under system 7) for about two
years now, and have been programming in all sorts of languages on all
sorts of machines for over ten years. This may or may not be enough
experience to tackle such a chore as we are discussing here. I am
currently taking a look at the gcc source, analyzing my abilities,
and researching compiler technology. I am pretty honest with myself
and if I do not see myself able to complete a robust port in a
reasonable amount of time, trust me: I will not take up the project.

mike white

RonaldS60

unread,
Mar 9, 1995, 3:16:03 AM3/9/95
to
If your interested (and have a spare Sun sitting around)
GCC 2.6.3 has been ported to A/UX (Apple's UNIX) and the
responses I (and others) have received indicate that it
would be fairly trivial (???) to run a cross compile from
a Sun (using GNAT) to GNU's intemediate code and to finish
it on the Mac. I would have tried this already but I've
got a random parity error that keeps popping up on my builds.


Have a nice day,
Ron
======================================================
Computers now make it possible to make more mistakes
more efficiently than ever before possible.
======================================================

Robert Dewar

unread,
Mar 8, 1995, 10:57:30 AM3/8/95
to
Actually I thought T.E.D. was very positive, I wish he would tell me how
to build an Ada 95 compiler in only 10 person years of effort! :-)

Note that there is NO port of GNAT for the MAC, as has often been noted
to this newsgroup, and yes, it would be very nice if someone would
create such a port!

Robert Dewar

unread,
Mar 8, 1995, 7:32:52 PM3/8/95
to
Mike, at this stage, I am afraid your lack of familiarity with compiler
technology is showing. Writing a lexical analyzer and parser for Ada is
by comparison with the rest of the task simple, but even these very
simple tasks are by no means trivial, especially if you want to get
any kind of decent error messages.

As for the idea that the only remaining step is generating machine language,


I am afraid it seems that your cource on compilers gave a rather false
impression. The hard part of an Ada compiler is the semantic analysis.

Developing a full Ada compiler with a code generator is indeed a difficult
project. The estimates of person years you see are for people with extensive
compiler experience. I would estimate that the time to complete such a project
for people without this kind of experience would be essentially infinite. You
would learn something trying, but you would have no chance of succeeding. If
that seems like a challenge, fine, as I say you will certainly learn something
trying.

As for porting GCC, this is a task that is probably about one twentieth the
effort of writing a compiler, but that too expects you to have significant
experience with GCC and the technology. If you are starting from scratch
and know little about compilers and processor architectures, you have a lot
to learn before you can succeed in such a port.

Also, a port to the Mac assumes a thorough familiarity with System-7, which
in itself is not easy, the internals of this system are complex.

After all, if it were easy to get a GCC port for the MAC, it would have
been done some time ago. Note that getting a GNAT port once a GCC port is
a MUCH simpler task, probably no more than a couple of person months at most
to get a first attempt.

Richard Kenner

unread,
Mar 9, 1995, 5:46:03 AM3/9/95
to
In article <3jlibk$p...@gnat.cs.nyu.edu> de...@cs.nyu.edu (Robert Dewar) writes:
>As for porting GCC, this is a task that is probably about one twentieth the
>effort of writing a compiler, but that too expects you to have significant
>experience with GCC and the technology. If you are starting from scratch
>and know little about compilers and processor architectures, you have a lot
>to learn before you can succeed in such a port.

Though true, this is somewhat confusing in the present context. It
is indeed the case that doing a port to a new processor architecture
requires considerable knowlege about GCC. Theoretically, you can do
a port with just the information in "Using and Porting GCC" but in
practice you need to know more in order to debug and refine the port.

I did the RS/6000 and Alpha ports in about one month each, but I spent
many years learning GCC to get that proficient in porting it. If you
are extremely knowlegable about compilers and architecture but know
nothing about GCC, you can probably get far enough along the learning
curve to do a port in about six months, but you have a high
probability of getting stuck somewhere in the debugging stage.

However, in the case at hand, we are NOT talking about doing a GCC
port to a new architecture since GCC has long been ported to the m68k
and is also supported on the PowerPC.

Here, the major concerns are operating system issues. If the calling
sequence used is the same as some other system (a big "if"), you could
do the port with essentially no knowlege of GCC internals (if you need
calling sequence changes, the amount you'd have to learn depends on
the nature of the changes).

However, what you do have to be very familiar with is System-7 and,
even more importantly, the rest of the toolchain: the assembler and
linker.

>After all, if it were easy to get a GCC port for the MAC, it would have
>been done some time ago. Note that getting a GNAT port once a GCC port is
>a MUCH simpler task, probably no more than a couple of person months at most
>to get a first attempt.

To clarify, this talks about porting to a "foreign" OS like System-7.
If you want to port GNAT to a Unix-like (or OS/2-like) system on which
GCC is already running, the major task is one of recompilation, which,
if you are familiar with basic cross-compilation strategies, can be
done in a couple of days, barring surprises (and not worrying about
tasking). However, there are some OS dependencies in GNAT beyond that
of GCC, so doing the first GNAT port to a new OS can indeed take
significantly longer than a few days.

Michael Feldman

unread,
Mar 9, 1995, 11:05:30 PM3/9/95
to
In article <3jg167$a...@nic.umass.edu>,

The GNAT project has consumed >3 calendar years, so I suppose somewhere in
the neighborhood of 20 person-years has been involved. And they are not
writing code generators, as they are building on top of the GNU backend.

If you are a Mac fan and have time on your hands, get busy developing
a port of gcc to the Mac; GNAT can then follow on its heels.

Ada compilers are not easy. Best to reuse something, especially if it
is free.

Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman - chair, SIGAda Education Working Group
Professor, Dept. of Electrical Engineering and Computer Science
The George Washington University - Washington, DC 20052 USA
202-994-5919 (voice) - 202-994-0227 (fax) - mfel...@seas.gwu.edu (Internet)
------------------------------------------------------------------------
One, two, three ways an underdog: Ada fan, Mac fan, Old Liberal Democrat
------------------------------------------------------------------------
Ada on the WWW: http://lglwww.epfl.ch/Ada/ or http://info.acm.org/sigada/
------------------------------------------------------------------------

Vladimir Vukicevic

unread,
Mar 10, 1995, 1:25:47 AM3/10/95
to
In article <evans-090...@evans.pgh.pa.us> ev...@evans.pgh.pa.us
(Arthur Evans Jr) writes:
> Were I going to do this project, I would start by studying
> Metrowerks, a more modern product than MPW that will likely take
> over MPW's market. Since Apple has no visible plans to upgrade MPW
> for PowerPC, it seems to be a dead product. But, I have no idea
> how easy it is, or even if it's possible, to implement another
> language under Metrowerks. It now supports C, C++ and Pascal.

You can indeed add new 'translators' to metrowerks, much like you can
with gcc. However, the task of ripping out gnat from its gcc roots and
performing surgery to get the piece to fit into metrowerks would be
-significantly- harder than porting gcc. Metrowerks provides
information on how to write new translators; however, there is
virtually no chance that the tree structure they use is semi-
compatible with gcc; they might not even use this type of
'translating'.

However, if you do port GNAT to run under Metrowerks, please let me
know :-)

-- Vladimir
-- vlad...@intrepid.com

Arthur Evans Jr

unread,
Mar 9, 1995, 8:42:30 AM3/9/95
to
In article <3jlibk$p...@gnat.cs.nyu.edu>, de...@cs.nyu.edu (Robert Dewar)
wrote about porting GCC to the Mac:

> Also, a port to the Mac assumes a thorough familiarity with System-7,
> which in itself is not easy, the internals of this system are complex.

True, if you make GCC into a stand-alone Mac application. However, if
you port GCC as an MPW tool, things are _much_ easier. MPW (Mac
Programmers Workbench) is a development environment that looks sort of
vaguely Unix-like, with a command-line driven interface. I do all my
development under MPW and have little experience with the Mac OS
interface; I don't suffer the lack (much).

Before Mike Feldman jumps in to make this next (valid) point, I'll make
it myself: A major advantage of GNAT and GCC is that they are free.
Requiring folks to buy a multi-hundred dollar product to get started is,
to say the least, unfortunate. Moreover, learning MPW is a serious
impediment to students. That said, I will jump in to acquire GNAT under
MPW, and I'm sure many others who want to do serious Ada development on
the Mac will do likewise. Moreover, many of us will gladly pay ACT (or
anyone else) a reasonable maintenance fee.

Were I going to do this project, I would start by studying Metrowerks, a
more modern product than MPW that will likely take over MPW's market.
Since Apple has no visible plans to upgrade MPW for PowerPC, it seems to
be a dead product. But, I have no idea how easy it is, or even if it's
possible, to implement another language under Metrowerks. It now
supports C, C++ and Pascal.

Art Evans

Arthur Evans Jr

unread,
Mar 10, 1995, 9:17:33 AM3/10/95
to
Commenting on my suggestion that a GCC port to the Mac might use

Metrowerks, vlad...@speedy.intrepid.com (Vladimir Vukicevic) wrote:

> You can indeed add new 'translators' to metrowerks, much like you can
> with gcc. However, the task of ripping out gnat from its gcc roots and
> performing surgery to get the piece to fit into metrowerks would be
> -significantly- harder than porting gcc. Metrowerks provides
> information on how to write new translators; however, there is
> virtually no chance that the tree structure they use is semi-
> compatible with gcc; they might not even use this type of
> 'translating'.

Interesting.

An important early decision to make in planning a GCC port to MPW would
be whether to use the MPW linker or GCC's. My guess, based on zero
knowledge, is that GCC's linker is enough different from MPW's that it
would require performing major surgery on GCC to use MPW's format. But,
nothing keeps you from using your own linker under MPW. Since GCC runs
on NeXT hardware, 680x0 code generators must exist. I would think that
the major task here, as in any port to a non-Unix target, would be
changing OS calls from Unix (or whatever) to Mac OS. And I certainly
don't call that a trivial task.

How does this discussion differ from the situation under Metrowerks?
What "tree" is it that Vladimir refers to?

Richard Kenner

unread,
Mar 10, 1995, 10:30:58 AM3/10/95
to
In article <evans-100...@evans.pgh.pa.us> ev...@evans.pgh.pa.us (Arthur Evans Jr) writes:
>An important early decision to make in planning a GCC port to MPW would
>be whether to use the MPW linker or GCC's.

GCC is a compiler that generates assembly language, so the term "GCC's
linker" is meaningless.

Perhaps you mean the GNU linker (gld). As far as I know, it has not
been ported to MPW.

Gary McKee

unread,
Mar 11, 1995, 2:45:01 PM3/11/95
to
In Article <3jkq49$m...@nic.umass.edu>, con...@twain.oit.umass.edu (Mike
White) wrote:
>...
================================================================
Mike,

I'd be interested in working with you if you decide to do the port of GCC. I
don't know the GCC technology (and need to learn it) but I've been working
with other Ada compilers for eleven years now.

I've done some Mac programming and I do have an Ada83 compiler on the Mac
(actually, I have both the Meridian & the GW/AdaEd compilers).

Let me know if you can use another engineer on this excellent project that
you are considering.


Gary McKee
--------------------------------------------------------------------
McKee Consulting (303) 795-7287
P. O. Box 3009 gmc...@cloudnine.com
Littleton, CO 80161-3009
--------------------------------------------------------------------

Mike White

unread,
Mar 12, 1995, 4:13:37 PM3/12/95
to
Well, I've been looking through gcc 2.6.3 for a while now, and am leaning
towards doing the port. Because this is a both a port and a large program,
I am trying to figure out how to accomplish a bare-minimal mac implement-
ation upon which I can build a good one. Minimally, it seems, the port
would take a single c file and compile it, outputting an assembler file.

I need to choose an assembler (and linker...) to test the assembly output.
Besides MPW, are there any good (free/ cheap) 68k or ppc assemblers out
there for the mac? I don't have MPW or enough money to buy it right now.
Fantasm is the only shareware one I can find, but it seems a bit limited.
I really wish I could scrape up $500 and get MPW pro! Maybe if I sell
that old 286... and printer... and monitor... and apple 2c clone... I might
have enough for a down-payment. (Please sob now for the poor college
student.)

Another speed bump: I could either try to write the mac port as a cross-
compilation on my unix account or compile gcc under a mac compiler.
The former is sure to compile but requires lots of zmodeming
and I'd have to ask for more disk allocation (ive now only got 8 megs and
downloaded gcc into a temporary file space that gets regularly purged.)
The latter is going to take quite some work to compile (some of the code
is in >32k files, etc., ETC!) but I've got space on my hard drive and,
well, it would be a lot more convenient. Any ideas or experiences?

thats all for now...
mike white

Vladimir Vukicevic

unread,
Mar 12, 1995, 6:51:56 PM3/12/95
to
In article <3jmdg3$3...@newsbf02.news.aol.com> rona...@aol.com (RonaldS60) writes:

>
> If your interested (and have a spare Sun sitting around)
> GCC 2.6.3 has been ported to A/UX (Apple's UNIX) and the
> responses I (and others) have received indicate that it
> would be fairly trivial (???) to run a cross compile from
> a Sun (using GNAT) to GNU's intemediate code and to finish
> it on the Mac. I would have tried this already but I've
> got a random parity error that keeps popping up on my builds.

Well, a port to A/UX, by comparison to a port to the general System
7 (MacOS) environment, is trivial since A/UX provides all the components
that would have to be worked aroud for a port to MacOS, notably a shell.
You should be able to compile GNAT for A/UX in this way, but this
port will not work on macs not running A/UX.

- Vladimir

Fraser Wilson

unread,
Mar 12, 1995, 11:55:00 PM3/12/95
to
I nearly cried when mfel...@seas.gwu.edu (Michael Feldman) explained:

>Ada compilers are not easy. Best to reuse something, especially if it
>is free.

It's true they're not easy. But writing an Ada compiler is a great
way to learn how compilers work.

I started one after a compiler course in 1988, and I still pop back
to it every now and then to test ideas. It was written from scratch,
and while it's no longer Ada, it contains overloading, inheritence,
C-ish expression syntax, packages, strong typing, exceptions, blah
blah blah etc etc.

And even if it's ultimately a useless endeavour, it was fun.

Fraser.

Theodore Dennison

unread,
Mar 15, 1995, 10:19:27 AM3/15/95
to
Fraser Wilson <ra...@zoom.jtec.com.au> wrote:
> I nearly cried when mfel...@seas.gwu.edu (Michael Feldman) explained:
>
> >Ada compilers are not easy. Best to reuse something, especially if it
> >is free.
>
> It's true they're not easy. But writing an Ada compiler is a great
> way to learn how compilers work.
>
..

>
> And even if it's ultimately a useless endeavour, it was fun.

I don't think we meant to imply that it was "useless". Personally,
I'm a firm believer that learning is never a waste.

Its just that trying to craft a complete implementation of Ada
single-handedly in one's spare time is practicly a hopeless task.
The image that springs to mind is that of the old man in Indiana
in the seventies who was building his own turnpike (by himself).
Sure, you'll learn a lot, you'll just never finish it.

I would like to suggest that, for learning purposes, a smaller
language would be more suitable. This way, you are more likely
to get around to building a code generator (to go with your
parser and lexical analyser). Pascal and C would probably be
good choices. Oberon would also be a good choice, as a book
(Written by Nicklaus Wirth) is avaiable on building compilers
that uses Oberon as an example. The complete source to Oberon
is gone over in detail during the course of the text.

Of course, if its really fame and glory you are after, porting
GNAT would be the better choice. :-)

T.E.D.

James M. (Mike) Hill 575-6632 msgid MHIL

unread,
Mar 17, 1995, 6:04:09 PM3/17/95
to
I anyone has or knows where I can find a Ada83
complex math package please drop me a line.
I have looked via WWW on some of the major
repositories without much luck.

Thanks in advance
Mike Hill

Henry Baker

unread,
Mar 18, 1995, 7:24:05 PM3/18/95
to

> I anyone has or knows where I can find a Ada83
> complex math package please drop me a line.
> I have looked via WWW on some of the major
> repositories without much luck.

I developed some stuff privately. What do you need?

--
www/ftp directory:
ftp://ftp.netcom.com/pub/hb/hbaker/home.html

Robert Dewar

unread,
Mar 19, 1995, 10:25:24 AM3/19/95
to
You could pick up the complex packages from GNAT, they would need a little
adaptation for Ada 83, but it should be easy enough to do.

0 new messages