Truth be known, I’ve never really been very interested in Computer Science. My undergrad is in Business, and my postgrad is in IT. I was busy writing COBOL-80 applications while the Comp Sci guys were building logic gates on patch panels.
For the most part it’s put me in good stead career-wise since the things you pickup in those HR, Marketing, and Stats units are actually quite useful in the IT space. But there are a few things you miss out on…
One unit I never did get a chance to pick up was Compiler design. I’ve often eyed off that dragon book and wondered what interesting stuff lurks beneath. I’ve done a little Flex when I was working as a C systems programmer in the early days, and a ton of Perl regular expressions since, but never really got into hardcore lexer/parser goodness.
Turns out that I haven’t missed out, as the whole space is getting a little resurgence through the whole Domain Specific Language movement. So I’m catching up some missed knowledge in my spare time while tinkering with Antlr.
My first little project is to trying to write a very simple lexer for Textile. I know, I know. There are already a few Java parsers already out there, but it’s pretty tricky to get all the combinations of nesting right in regexps, so I’m keen to see how far I could get with a full blown parser. Plus it’s mainly a learning exercise (but it will end up in a Grail project on my drawing board somewhere down the track).
Antlr is quick a beast. But the documentation is growing and I’ve found a couple of good articles that have been helpful in getting started. Also turns out that Textile is quite like TML, so there are some grammars to kickstart things. And ANTLRWorks is a very cool little IDE.
It’s hard yards… but we’ll see how I go…