Skip to content

Compiler Construction

April 23, 2014

I’m taking an online course on compiler construction from Stanford via Coursera. I took it out of general interest and also thinking it would help me with my work on LCC1802 that is used for olduino.

The course uses the classic dinosaur compiler tools (lex and yacc etc) but goes into great detail on the underpinnings. I’m enjoying it and certainly learning new things but I’m also increasingly grateful for the effort that people have put int compilers old and new. The amount of detail work that goes into parsing and type checking a language like C is astounding. Just issuing useful error messages is a daunting thought.

I’m truly lucky to have stumbled into LCC early in my quest for an 1802 C compiler. I might be able to cobble something together with the tools I’m learning but it would be many times as much work and wouldn’t be nearly as well done.

Also, a tip of the hat to Ted Rossin who developed his own C-subset compiler for the 1802 which does indeed parse and check and issue decent messages.

I note though, that as I get closer to the back end of the compiler: storage allocation, instruction generation etc., I find it much easier. I can answer quiz questions by inspection rather than tearing my hair out.


From → Uncategorized

Leave a Comment

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: