[antlr-interest] <name>

Terence Parr parrt at cs.usfca.edu
Thu May 24 11:39:50 PDT 2007


On May 24, 2007, at 10:35 AM, Luke A. Guest wrote:

> On Thu, 2007-05-24 at 10:19 -0700, Terence Parr wrote:
>> sure. whatever attributes go into lexer() template and outputFile()
>> or whatever are visible to any enclosed template.  I think <name> may
>> actually be the grammar name.
>
> No, <name> is actually the fully composed name, TLexer, in my case.
>
> In outputFile, <name> is TLexer, same for headerFile and lexer.  
> But, in
> lexer, I just tried <grammar.name> and got T, which is what I want,  
> but
> I also need this for outputFile and headerFile as the packages are
> generated there.
>
> I take it the <recognizer> rule dumps out the one specified, lexer,
> parser, treeparser or a combination. Is that correct?

I believe so.

Use -XdbgST on ANTLR I think and you'll see <templatename>stuff</ 
templatename> in output so you can see exactly which template  
generates the surrounded text.  Cool, eh?

Ter

>



More information about the antlr-interest mailing list