Blog Stats
  • Posts - 79
  • Articles - 1
  • Comments - 29
  • Trackbacks - 191

 

PDC05: Writing a Dynamic Language Compiler in One Hour

I've already seen much of the technology here at the PDC05, so I've been looking for presentations that would teach me something new. One of the sessions that popped out at me was TLN410, CLR: CLR: Writing a Dynamic Language Compiler in One Hour. I haven't written a compiler since classes in college, so this was a nice review of a writing a basic scanner/parser that targets the CLR.

The scenario is a made-up language called Good For Nothing (GFN). I would have called it GFN# or GFH.NET, but that's probably a good reason I'm not giving this presentaiton.

The compiler itself is written in C# and then uses Reflection.Emit to generate the IL code for and calls into the framework to compile a simple application written in GFN:

var x = “hello world“;
print x;

Note the local variable type inference. :) They also showed type coercian implemented in the compiler. Nothing complicated, but cool to see those dynamic language features in a compiler targeting the CLR.


Feedback

# re: PDC05: Writing a Dynamic Language Compiler in One Hour

Gravatar Hey there...Glad you liked our talk! Looking forward to seeing some of the extension attendees will make to it. :)

Cheers,
joe 9/14/2005 2:46 PM | Joe Duffy

Post a comment





 

Please add 3 and 7 and type the answer here:

 

 

Copyright © Drew Robbins