|How long does it take to build a compiler? firstname.lastname@example.org (Youngwhan Lee) (1993-10-27)|
|Re: How long does it take to build a compiler? email@example.com (1993-10-29)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (1993-10-30)|
|Re: How long does it take to build a compiler? email@example.com (Youngwhan Lee) (1993-11-01)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (1993-11-01)|
|Re: How long does it take to build a compiler? email@example.com (1993-11-04)|
|Re: How long does it take to build a compiler? firstname.lastname@example.org (1993-11-05)|
|Re: How long does it take to build a compiler? xjam@ginkgo.CS.Berkeley.EDU (1993-11-09)|
|Re: How long does it take to build a compiler? email@example.com (1993-11-09)|
|[1 later articles]|
|From:||firstname.lastname@example.org (Brendan Jones)|
|Organization:||Hatch Usenet and E-mail. Playa del Rey, CA|
|Date:||Sat, 30 Oct 1993 21:59:47 GMT|
Youngwhan Lee (email@example.com) wrote:
: Now, I want to build a compiler on top of it. I'll enhance an existing,
: simple and well-defined language in mind to immitate.
: ... I need to estimate the time period for the project.
I couldn't find the full text original posting, so don't know what your
question was. If however you were looking for a description of "how long
it takes to build a compiler", the answer is, once you know what you are
doing... not very long at all.
:nostalgia mode begins.
Depends what grammar you are using. Because they are easy to code and my
languages fit the grammar, I always write LL(1) recursive descent parsers.
These are *very* easy to do, and easy to extend.
I wrote my first compiler when I was 18, with a buddy of mine. We started
at 8pm and had it finished by 4am.
Then I wrote a pascal-like compiler (it wuz *fast*) for the old Commodore
Vic 20 and Apple ][, complete with an inbuilt editor. These days a
debugger *is* essential, but "in those days" (1983) I think they were
unheard of. The runtime library took about two weeks. The compiler
itself no more than a week and a half. And this is with really lousy
tools, and in old-fashioned BASIC and in hand-coded assembley (yes, I
memorised the numbers and wrote them down by themselves). So, with lousy
tools on a machine with 16k RAM I was able to write a pascal-type language
with a development system in about three weeks. The Apple ][ port took a
similar amount of time.
Recently, I wrote a demo compiler for a friend. Using a PS/2 with Turbo
C++ I was able to throw together the skeleton LL(1) parser in three hours.
The catch was that the OBJ format that Microsoft uses is *really* *really*
messy. If I was to pump this thing into a full language I figure I would
spend most of the development time trying to understand the OBJ format.
Aside from that, it struck me how darned easy and quickly I was able to
put the compiler skeleton together. I figure if you know what you're
doing, you could belt out a new compiler... less the debugger... in about
a week. Nifty stuff like optimization and the like you can add as you
find the time.
Incidently, most of my data file are now in LL(1) format. It is that
easy, and once you've mastered it... fast!
Return to the
Search the comp.compilers archives again.