[Mono-devel-list] Pascal compiler?

Kelly Leahy kellyleahy at swbell.net
Sun Mar 13 20:04:58 EST 2005

I can offer a C# parser and lexer for Pascal as well. 
It is not in the perfect form for a compiler, as I was
using it for some other things, and it is not quite
complete (and won't be anytime soon).  However, it may
prove to be a decent starting point.

It is a recursive descent parser with a lexer that can
handle IFDEFs and such, except for the D5 and later

Let me know if you'd like me to send it (and to whom
to send it).  I don't currently have a web site
available to put it on, but I can give it to anyone
who would like to put it on theirs.  I also have no
license requirements for this code and am perfectly
willing to give it away to anyone who wants it.


--- Grant Hess <granthes at localaccess.com> wrote:
> Other than the fact that I don't know what the
> Delphi.net extensions to 
> the language spec are, I'd love to begin on this. 
> I've spent almost 10 
> years working in Delphi (well, I did start with
> Turbo Pascal 8) ) and 
> would love to see it available in an open platform.
> Comments follow:
> Willibald Krenn wrote:
> > We have four possiblities as I see it:
> >  1.> Implement from scratch with some compiler
> generator
> This seems possible, but some Delphi features are
> more difficult to 
> describe in a parser generator than just building
> directly in a 
> recursive decent.
> >  2.> Implement from scratch (based on the
> recursive descend parser from 
> > above)
> I have built (not production quality, unfortunately)
> several different 
> rd parsers for pascal and variants over the years. 
> I agree it is a 
> fairly simple process.  One thing that looks
> promising for this route is 
> the fact that the object oriented design paradigm
> has matured greatly 
> since the last time I tried this. (Or maybe I've
> just learned how to use 
> it better? 8)  )
> >  3.> Fork from Free Pascal Compiler
> While I have nothing against the Free Pascal guys, I
> don't feel very 
> confident in this path.  It seems like their
> compiler is trying to be 
> compatible with every flavor of pascal out there and
> almost making it. 
> I think that we would be better off in picking just
> one single 
> (specific) language definition and working with it
> exclusively.  Perhaps 
> we could expand compatibility to other flavors of
> pascal later, once we 
> have an actual working implementation.
> >  4.> Take (g)mcs and make it understand Delphi
> I would love to be able to leverage all of the
> talent that has been used 
> to make the mcs and gmcs compilers.  Even if we
> could merge a new parser 
> onto the gmcs back-end it would simplify the task
> greatly.
> Furthermore, the optimization work being done on the
> gmcs compiler is a 
> great attention getter for me.
> > 
> > 3.> has the nice benefit of the compiler being
> self-hosted (?) - I mean 
> > the source of the compiler itself would be in
> Pascal and a good unit 
> > test. Drawback: We need a Delphi.NET command line
> compiler for 
> > bootstrapping during the first time (Perhaps
> there's some free community 
> > version?) and we'll have to introduce significant
> modifications to the 
> > FPC code base.
> > 
> > 4.> Maybe some of the (g)mcs developers can help
> us out here, explaining 
> > what would have to be done? But due to the
> differences between C# and 
> > Delphi chances are good that we have to modify the
> used IR.
> > 
> > BTW: Theoretically we could even mix languages ;-)
> > 
> > I guess we agree on a managed implementation..
> True, I think that managed is the better choice.
> > 
> > Willi
> > 
> > _______________________________________________
> > Mono-devel-list mailing list
> > Mono-devel-list at lists.ximian.com
> >
> > 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com

More information about the Mono-devel-list mailing list