jordan.terrell
Just trying to make sense of things...

Language Designers Should Publish Their Compiler Front-End

Monday, 25 February 2008 09:58 by jordan.terrell

As of late I've been doing a lot of research on understanding and designing computer languages and compilers.  Right now I'm just starting to read two books: Programming Language Pragmatics (Second Edition) and Engineering a Compiler.  Even though I have not read very far into either of these books, I've come to the following conclusion:

Language designers should publish the source code to their compiler's front-end.

Now, in case you don't know what the front-end of a compiler is, take a look at what Wikipedia has to say about it.  To put it in oversimplified, laymen's terms: "The front-end basically parses the source code, and makes sure it is a valid."  That's it, it doesn't actually spit out your target code (e.g. machine code, MSIL, ect..), it only parses it to make sure it can understand the source code.  The back-end of the compiler is responsible for the rest (for those who are compiler savvy, I know this is overly simplified).

With that in mind, I now come back to my original statement:

Language designers should publish the source code to their compiler's front-end.

No doubt many of you have noticed the surge of development tools around refactoring and code analysis.  Most of these rely on some language parsing component to understand the source code you are working with and make suggestions.  Developing tools like these would be much simpler and consistent if everyone relied on the same compiler front-end.  Plus, I would think that it would only help to drive further adoption of the language.

I've got a few code analysis ideas that I would like to work on, and this is what has driven me to do research on developing compilers.  In order to implement these ideas, I'm going to need to write a few compiler front-ends for some of the more popular .NET languages.  Granted, there are some tools to help me do this (e.g. Lex, Yacc, Flex, Bison, Coco/R, ANTLR), but it would be so much more productive and consistent if the language designers would publish at least their compiler's front-end.

Tags:   ,
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed
Comments are closed