[antlr-interest] new book organization question

Terence Parr parrt at cs.usfca.edu
Tue Aug 19 18:11:34 PDT 2008


Dear ANTLR and language folks,

I'm 200 pages into the new "DSL design patterns" book with pragmatic  
programmers but have not settled on a proper organization and flow for  
the book. I'm again working with Susannah Davidson Pfalzer, the great  
editor from my previous book. We thought it would be a good idea to  
discuss the book organization with you folks as many of you are  
squarely in the target audience for the book.

Identifying the target audience is crucial and I think it should be  
essentially practicing engineers that need to implement a programming  
language or data file format etc. The idea will be to teach  
programmers how to implement languages rather than provide a series of  
ready-made solutions. That said, I would like to use partial solutions  
to some real-world problems to identify patterns and describe/justify  
important principles. Rather than simply providing an index of  
language implementation patterns like the famous design patterns book  
by the "gang of four", I'd like to solve a bunch of problems and  
identify key ideas as I go. There would be an index and short  
description of the design patterns at the end, with references back  
into the examples and discussion. This will not necessarily be a good  
textbook (though we could add some sample problems for fun). It will  
not cover all possible parsing algorithms for example, something that  
most professors bore students with. ;)

As for the organization of the book, I'd like to break the book up  
into different parts/units according to language application  
categories (reader, generator, interpreter, translator, etc...).  Each  
part will use techniques and patterns identified in the previous  
parts.  Each part would start out with an overview of the application  
category and then dig in solving problems rather than using a dry list  
of pattern definitions. Lets solve some of the problems in order to  
identify key patterns and principles. This means a traditional book  
with parts, chapters, and sections. The parts would be in this order

I. Introduction
  basic architectures, describe application categories,
  introduce language implementation ideas.

II. Generators (before readers because it's easier to understand)

III. Readers (parsing, introduces all of the intermediate data  
structures too)

IV. Semantic analysis, type checking, symbol tables

V. Interpreters

VI. Translators

Once we argue about this for awhile, I will give you the list of  
examples I want to include. :) Any and all thoughts welcome even if  
it's something like "take a writing class" ;)

Ter


More information about the antlr-interest mailing list