Jump to content
Tuts 4 You

Let's build a compiler for the CLR


sirp

Recommended Posts

Posted

Introduction

This book demonstrates the process of creating a language compiler for the CLR. It

contains a mixture of generic compiler construction topics and topics specific to

compiling for the CLR.

How it came to be

For many years, I wanted to write a compiler. I read, or tried to read, a lot of books on the

subject. Two things about these books consistently turned me off: one, they were, one

and all, written using language familiar to mathematics and computer science students,

but Greek (many a time, literally) to the rest of us. Two, almost all of them were full of

information about sundry alternate means to read source code and understand it, but

contained precious little information about how to generate machine code, and

specifically machine code for the only kind of machine that I had handy; x86.

Then, I hit the jackpot; I read a brilliant article series called "Let's Build a Compiler" by

Dr. Jack Crenshaw. I love Dr. Crenshaw's approach of learning by doing, showing ONE

way of doing things while mentioning that there were others, avoiding jargon until

unavoidable and explaining it lucidly when not, and above all, keeping it simple. This

article series taught me more than all the books I had read so far, and even the books

started making more sense after I finished the series. "Let's Build a Compiler", © Jack

Crenshaw, is definitely recommended reading for anyone who wants to learn about how

compilers are built.

by Raj Chaudhuri

blog

LBCC.pdf

Posted

Introduction

This book demonstrates the process of creating a language compiler for the CLR. It

contains a mixture of generic compiler construction topics and topics specific to

compiling for the CLR.

How it came to be

For many years, I wanted to write a compiler. I read, or tried to read, a lot of books on the

subject. Two things about these books consistently turned me off: one, they were, one

and all, written using language familiar to mathematics and computer science students,

but Greek (many a time, literally) to the rest of us. Two, almost all of them were full of

information about sundry alternate means to read source code and understand it, but

contained precious little information about how to generate machine code, and

specifically machine code for the only kind of machine that I had handy; x86.

Then, I hit the jackpot; I read a brilliant article series called "Let's Build a Compiler" by

Dr. Jack Crenshaw. I love Dr. Crenshaw's approach of learning by doing, showing ONE

way of doing things while mentioning that there were others, avoiding jargon until

unavoidable and explaining it lucidly when not, and above all, keeping it simple. This

article series taught me more than all the books I had read so far, and even the books

started making more sense after I finished the series. "Let's Build a Compiler", © Jack

Crenshaw, is definitely recommended reading for anyone who wants to learn about how

compilers are built.

by Raj Chaudhuri

blog

interesting... so using vb's compiler vbc, you create another compiler to do your work...

up until page 51 the author uses vbc

have you made your own compiler and created a hello world exe??

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...