There is a book called "Constructing Language Processors for Little
Languages" by Randy M. Kaplan (Wiley) that is pretty good. It has
some of code on a floppy and is intended for just the scope you are
talking about.