2007-04-21

Writing a parser

Inspired by a thread about parsers on Channel 9, I've decided to start a series of blog posts on writing a parser. The parser I (and hopefully some of you) will write, will be able to parse a simple BASIC-like language with enough features to make it interesting, without being too complex.

The name of the language will be ADL, which stands for Acronymic Demonstrational Language. A pretty lame name but if you have a better name, please leave a comment here. I'll try to show you how easy it is to write a good parser using simple techniques (reading 1 character at a time, no state-machine) without a lot of dry theory. The first introductory post (after this one) will have some theory and some terminology you need to know, but after that the fun will start.

Technorati tags: , , ,
Comments:
Hi Tommy, this is Beer. I wrote most of a SQL parser. It wasn't fun, and I have to re implement it as what I wrote was just a bootstrap. I have many, many, many books on writing compilers. I would only ever recommend this one: http://www.amazon.com/Crafting-Compiler-C-Charles-Fischer/dp/0805321667/ref=sr_1_1/002-9452255-2941606?ie=UTF8&s=books&qid=1177170145&sr=8-1

"Engineering a compiler" sucks, the dragon compiler book sucks, the .NET compiler implementation book sucks, and most all of them are pretty useless and arcane explanations of regular expressions used in parsers.

Good luck with your parser in ADL.
 
Hey man, why are you always putting your face all over your posts and such? Do you think you're some kind of handsome guy, or something?

In the picture on the front of your blog, you look like you have a Hitler mustache. Ugly, man.
 
Post a Comment

Links to this post:

Create a Link