[antlr-interest] 'Cannot find tokens file '

Hendrik Maryns qwizv9b02 at sneakemail.com
Mon Nov 10 03:15:41 PST 2008


Gavin Lambert schreef:
> At 03:43 7/11/2008, Hendrik Maryns wrote:
>  >So now I have fsqLexer.g, fsqParser.g and fsqTreeParser.g.  The
>  >latter complains that "(3): cannot find tokens file
>  ><unset-dir>/fsqParser.tokens".  Indeed, there is no file
>  >fsqParser.tokens.  fsqParser.g compiles fine, and even from
>  >the command line, no tokens file is created.  What is the
>  >solution to this?
> 
> The file is more likely to be named fsq.tokens, not 
> fsqParser.tokens.

There is no file fsq.tokens.
This is a message from antlr, so how can I change this?  I didn’t do
anything except creating the three grammar files.  Should I put the line

tokenVocab=fsqLexer;

in faqTreeParser?

> The tokens file should appear in the same folder as the target 
> language output files.

Hm, AntlrIDE (for Eclipse) seems to move the Java output files to the
appropriate folder, but leave the tokens file where the grammar is.
This is fine with me.

Aha, invoking antlr from the command line indeed does create the file
fsqParser.tokens.  So this seems to be a bug with AntlrIDE.  Is somebody
from there reading this, or should I report it elsewhere?

Thanks, H.
-- 
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
==================
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20081110/d80dee42/attachment.bin 


More information about the antlr-interest mailing list