[antlr-interest] book examples list

Terence Parr parrt at cs.usfca.edu
Fri Aug 22 13:46:42 PDT 2008


On Aug 21, 2008, at 10:06 PM, Kirk Woods wrote:

> As I look at this list, I see some of it as not very applicable to  
> most of the work I have done over the last twenty years.  I don't  
> write compilers or general purpose languages, but I create  
> applications with a focus in distributed systems.  As a "lazy"  
> programmer, I have created, from time to time, my own domain  
> specific languages and then generated a lot of code.  The last one I  
> did was with ANTLR and StringTemplate to generate a Java service, a  
> Java client, a C++ client, an Access database for data driven  
> testing, and a test framework to exercise the service.  All that  
> code was generated from a single service interface definition file  
> (similar to WSDL), and a different template for each implementation  
> type.

Well, the Object relational mapping uses reflection to generate Java  
and SQL stuff;  very much in line with what you do.

> I would like to see examples that are more relevant to building  
> applications such as what I did above.  For pushing the envelope,  
> using an OWL ontology file to generate client interfaces and an  
> agent implementation in JADE would certainly do the trick.

Well, it's hard to dig deeply into any one person's particular area of  
interest. Many people are interested in building programming languages  
and would find such an example distracting. So it depends on your  
perspective I guess.

> I like the Object-Relational mapping, as that is very relevant to  
> many applications.  I have never had to write a business application  
> using Postscript, nor have I seen any requests for such applications.

In the example I explain that I'm really just generating byte codes;  
rather than do Java byte codes I picked post-trip to because it's cool/ 
unusual and teaches you something about the PS language. Remember,  
this book is not about giving you solutions, it is about teaching you  
how things work. It will be less a cookbook and more a design patterns  
book.

> A configuration file reader is very useful; I just wrote yet another  
> one.  XML is the least friendly, "human readable", data file I know,  
> so an XML reader can be useful.  As much as it pains me to say it, C  
> is now an ancient language, so I don't know how many of your readers  
> will be able to relate to it as an example.

  could be. Excellent point. I need to find a simple non-object- 
oriented language, however, so I can demonstrate a simpler symbol  
table before going to Java or an object-oriented language.

Thanks Kirk!
Ter


More information about the antlr-interest mailing list