SLANGFOR.net is an attempt to teach Compiler Construction using C# and the .NET platform. The Programming language was created for a BarCamp session which was held @ Technopark, Trivandrum , INDIA. The Project has been hosted in CodePlex as part of the Presentation (on SLANGFOR.net ) for Community Tech Day event @ Kochi ,Kerala , INDIA(to held on 30th january 2010).

The Compiler will be written in stages demonstrating the process involved . The Software aims to demonstrate Compiler engineering as a software engineering excersise.


Compiler Construction has now become Just another Software engineering Activity. Now a days people can write compilers as fast as they can type. One reason is better Compiler Construction tools and better people around. The Presence of Compiler infrastructure software like Microsoft Phoenix , LLVM and Coins infrastructure project makes the task easier.


Just remember this before you start learning about compilers "Interpreter/compiler of a programming language is just another program !!!"

The project folders contain a PDF document which outlines the details of each step.

SLANGFORDOTNET STEP 1
- - - - - - - - - - - - - - - - - - - - - - - - - -
The Step 1 creates a class hierarchy to model the composition of Expression. Consult the PDF
documentation available in the DOC sub folder.


SLANGFORDOTNET STEP 2
- - - - - - - - - - - - - - - - - - - - - - - - - -
The Step 2 starts from where STEP 1 left off. In this version of the code , you have got additional classes
for Lexical analysis ( Lexer.cs ) , Parsing ( RDParser.cs ) , An Expression Builder ( Builder.cs ) besides
the AST classes from the STEP 1. Consult the PDF documentation available in the DOC sub folder.

SLANGFORDOTNET STEP 3
- - - - - - - - - - - - - - - - - - - - - - - - - -
This Step adds support to Print and PrintLine Statement. The documentation has been uploaded along
with the distribution.


SLANGFORDOTNET STEP 4
- - - - - - - - - - - - - - - - - - - - - - - - - -
This Step adds Variable support ( String , Booleand and Numeric ) , Assignment Statement to the compiler...
The detailed documentation is bundled with the zip file....!

SLANGFORDOTNET STEP 5
- - - - - - - - - - - - - - - - - - - - - - - - - -
This Step transformed the software to a Compiler which generates IL code. The detailed documentation is
bundled with the zip file ( needs improvement )


SLANGFORDOTNET STEP 6
- - - - - - - - - - - - - - - - - - - - - - - - - -
This step adds support to relational operators ( > , < , >=, <=,<>,== ) , Logical Operators ( ! , && , || ) , IF and While Statement.
The documentation is bundled with the zip file.

SLANGFORDOTNET STEP 7
- - - - - - - - - - - - - - - - - - - - - - - - - -
This step adds support to Functions. This makes SLANG mature enough to become a Domain Specific Language.
(Of course , we need to support CLR objects ..which is pretty much easy ). The documentation is bundled with the
zip file. The documentation needs a bit of tweaking as well.. Enjoy !



Last edited Jan 29, 2010 at 8:54 AM by praseedp, version 17

Comments

No comments yet.