Am I correct in my understanding: [snippet from grammar file] file : rec=record -> {%file(r={$rec.text})} ; %file corresponds to a StringTemplate template. r corresponds to the template parameter So my template could be: file(r) ::= "My record = <r>"