[Mono-devel-list] Pascal compiler

Philipp Haller hallerp at gmail.com
Wed Mar 16 17:12:56 EST 2005


Hi all,

I am (brand-)new to this list, so I am not replying to Willi's last e-mail...

Having read the whole thread about a free managed Pascal compiler I
want to share some thoughts on this. If there is already a different
place to post mails to (Willi?) I apologize for this.

So here it goes...
A colleague at the research center where I work as a grad student has
worked the past 1-2 years on a Object Pascal front end (parser +
semantic analyzer) for a re-engineering tool. He has been using the
ANTLR parser generator (www.antlr.org) which generates recursive
descent parsers and has also a very good scanner generator, so you can
easily deal with the ".." in (array) ranges and other things that
might be more complicated in other parser generators. ANTLR also
supports syntactical and predicated look-ahead which makes it possible
to specify a grammar that is stricly seen no LL(k) grammar. My
colleague has been implementing in Java but ANTLR can also generate
parsers in C#, so his grammar spec file should be almost completely
reusable for a C# implementation.
Although I have access to our (internal) CVS repository I need to make
sure it is open source, first.

As I have some experience in writing parser generators with ANTLR I
can only recommend it, there is almost no loss in flexibility compared
to a hand-written recursive descent parser. I even used ANTLR to
manually call (!) selected productions in the generated parser! ANTLR
also supports building abstract syntax trees (similar to JJTree of
JavaCC) but I haven't tried that, yet.

Philipp



More information about the Mono-devel-list mailing list