Software development industry analysis by Larry O'Brien, the former editor of Software Development and Computer Language
Wednesday, May 02, 2007

The source code to the Microsoft.Scripting namespace is available at http://www.codeplex.com/IronPython/Release/ProjectReleases.aspx?ReleaseId=438

A review of the IronPython codebase in the release makes the early-stage processing look pretty close to the (well-designed) IronPython 1.0 release: there's a language-specific tokenizer, parser, AST generator and walker. Once you've transformed your AST into whatever-the-appropriate-form is, code generation looks insanely easy.

So the bad news is that there's no compiler = new Language(BNF myGrammar); statement. The good news is that we already have such things: they're called Lex and Yacc -- or better yet, ANTLR. Although the sheer line-count of a language-specific compiler using Microsoft.Scripting seems large, such tools should be able to generate maybe 80-90% of it (I'm talking of the compiler, not the shell or runtime support, but that, too, looks generically handled by Microsoft.Scripting).

But this is one of those recursive things -- you can't generate a DLR-based compiler until someone writes a DLR target for the compiler-compiler. Interestingly, the definitive ANTLR Book will hit the shelves any day now. Hmmm ... if I was a kid interested in getting a job at Microsoft, I know what I'd be doing this Summer ...

Wednesday, May 02, 2007 8:17:39 AM (Hawaiian Standard Time, UTC-10:00) |  Disqus link  | DotNet | Knowing | Languages#
Search
About Larry...
Flickr photostream
Subscribe: RSS 2.0 Atom 1.0
Popular Articles
Programming Sabre with Java, C#, and XML
Genetic Programming in C#
15 Exercises To Know A Programming Language
Top 10 Things I've Learned About Computers From the Movies and Any Episode of "24"
Recently Published Articles
HI
KonaKoder
Categories
Archive
Admin Login
Sign In
Toolroll