|Doing a compiler firstname.lastname@example.org (1997-11-09)|
|From:||email@example.com (Paulo Jose Pinto - LEI)|
|Date:||9 Nov 1997 12:01:26 -0500|
|Organization:||Faculdade de Ciencias e Tecnologia, U.N.L., Portugal|
|Keywords:||practice, question, comment|
After two years of playing around with compilers, doing grammars,
mini-interpreters and learning a lot of stuff that only practice shows,
I've decided to do a rather ambicious project.
I want to do a Turbo Pascal/Delphi compiler and since I'll do it as
an hobby, I hasn't a deadline :-).
I know that there are several free Pascal compilers lying around, such
as p2c and gpc, however I want to do it either way.
But I am facing a dilemma :
- Should the compiler be done in a subset of Pascal (TP 5.0) that is
suported by p2c, so that it can be easily ported to other platforms ?
- Or should it be done in a language like C or C++ with yacc/lex ?
I think that the first one is the best because I remember that someone
in this newsgroup a few months ago (C vs C++ in compiler books) has said
that a compiler for a general programming language should be built using
that same language. The second one is also appealing because it implies
a smaller development cycle.
I hope when the compiler reachs the phase of code generation, I could
play around with optimization techniques and that poses a problem if I
choose C++, because I think that I shouldn't try to convert the
procedural algorithms described in the books to OO because in that way
I'll loose focus of the problem.
I would like to receive comments to this post.
Bye and thanks to everyone.
| Paulo Pinto, firstname.lastname@example.org |
[My main advice is to start with a small project or you'll never get to
a point where anything works. -John]
Return to the
Search the comp.compilers archives again.