[antlr-interest] Antlr V3 string template creation

Terence Parr parrt at cs.usfca.edu
Mon Jun 26 09:39:40 PDT 2006


On Jun 26, 2006, at 4:29 AM, Mark Venbrux wrote:

> Antlr Works! ... is wonderful. Would you call this a Domain  
> Specific Language for creation ... domain specific languages?

:)  More of a GUI dev tool, but sure :)

> Anyway, I created the grammar below as a finger-exercise, and it  
> works. It was trial and error to get the Stringtemplate screated.  
> So now I wonder: is this the way to do it, or can it be done in a  
> more elegant, concise way?

The grammar looks correct.  Also, you can do name={$name} instead of  
name={$name.text} and then in templates assume a Token is coming in  
and do <name.text> :)

Ter


More information about the antlr-interest mailing list