Haskell Compiler Series

I’m posting a series on writing a compiler in Haskell for a subset of Java called NewL using Alex and Happy for the lexing and parsing. I’ve completed the following topics so far.

1. Go over the grammar of NewL.
2. Scanner for NewL using Alex.
3. Parser for NewL using Happy.
4. Error recover and reporting for the scanner and parser (I’m keeping it simple and abort on the first error and print the line and column number).
5. Symbol table and how it’s used in semantic analysis and code generation.
6. Revised NewL language and more symbol tables.
7. Type Checking.
8. Preliminaries on using LLVM for code generation.
9. The basics of LLVM.

The code is available on GitHub at http://github.com/bjwbell/NewL-Compiler.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s