[antlr-interest] RE: Does tree parser have to export its own token types?

Terence Parr parrt at jguru.com
Wed Nov 20 00:18:31 PST 2002


On Tuesday, November 19, 2002, at 10:35  PM, Daniel Gackle wrote:

> Ack.  I just had the novel idea of checking the documentation
> and found a partial answer in the "Token Vocabularies" section.
> I now understand that if I put my tree parser, parser and lexer
> all in the same file and give them all an "exportVocab = XXX"
> option, only one XXXTokenTypes will be generated.
>
> But what if I want them in separate files?  It seems that
> importVocab lets you make sure that one grammar has access
> to another's tokens, but there's no easy way to stop it
> from exporting them to its own token space.  Is that correct?
>
> To reiterate, in my case the new grammar isn't defining any
> tokens of its own, so for it to export its own personalized
> token space is superfluous.

But that extra file isn't hurting anything is it?

Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list