Porcupine: a new object pascal compiler, developers needed!

Rob Edwards <robin.ge@gmail.com>
Sun, 24 May 2009 16:14:50 -0700 (PDT)

          From comp.compilers

Related articles
Porcupine: a new object pascal compiler, developers needed! robin.ge@gmail.com (Rob Edwards) (2009-05-24)
| List of all articles for this month |

From: Rob Edwards <robin.ge@gmail.com>
Newsgroups: comp.compilers
Date: Sun, 24 May 2009 16:14:50 -0700 (PDT)
Organization: Compilers Central
Keywords: Pascal
Posted-Date: 24 May 2009 19:44:12 EDT


I have been working on an Object Pascal compiler for the Parrot
Virtual Machine called Porcupine. Parrot is a virtual machine for
dynamic languages and provides a huge library and runs on most popular
platforms. It boasts several features such as Interoperability between
its native languages, a Native Call Interface (easy access to C
libraries) and an incredibly vibrant and helpful user community.

Now a brief summary of how a parrot compiler is constructed, for those
who aren't already familiar with it. The
parser written in Perl 6 Rules (regex's in classes) and is compiled by
the Parrot Grammar Engine into a parser this produces a parse tree.
From this parse tree most rules/elements/symbols have an associated
action. These actions are written in Not Quite Perl 6 (as subset of
the perl 6) which are responsible for coercing the parse tree in to a
Parrot Abstract Syntax Tree. This tree can then be compiled using the
Parrot Compiler Toolkits HLL::Compiler class. Built-in functions /
procedures / keywords and data type classes are implemented in a high
level intermediary code called PIR Parrot Intermediary Runtime.

Although you maybe not familiar with the languages mentioned, I can a
sure you they are easy to learn and very productive. Also I intend to
bootstrap a compiler to replace NQP which will allow at least %40 of
the compilers code to be written in a pascal like language with a few

The following features are currently working (to varying degree) in
porcupine: constant declaration, variable declaration, variable
assignment, if statements, compound Statements, while statements, for
satements, repeat statements, operator table, procedures, functions,
exceptions, try statements, IO, class declaration, fixed size arrays,
type checking, units

The project is currently hosted on googlecode available at:

If any of you are interested in helping out please send me an email
and I will give you a hand getting started and commit access to the
rsvn epository.



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.